compiler: run python3 ./x.py fmt

This fixes a build issue with formatting as part of #83800.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-04-03 15:00:10 +08:00
parent 6f1ac8d756
commit 8f73fe91f5
2 changed files with 9 additions and 7 deletions

View File

@ -927,8 +927,13 @@ pub fn build_configuration(sess: &Session, mut user_cfg: CrateConfig) -> CrateCo
user_cfg
}
pub fn build_target_config(opts: &Options, target_override: Option<Target>, sysroot: &PathBuf) -> Target {
let target_result = target_override.map_or_else(|| Target::search(&opts.target_triple, sysroot), Ok);
pub fn build_target_config(
opts: &Options,
target_override: Option<Target>,
sysroot: &PathBuf,
) -> Target {
let target_result =
target_override.map_or_else(|| Target::search(&opts.target_triple, sysroot), Ok);
let target = target_result.unwrap_or_else(|e| {
early_error(
opts.error_format,

View File

@ -1791,11 +1791,8 @@ impl Target {
// Additionally look in the sysroot under `lib/rustlib/<triple>/target.json`
// as a fallback.
let p = sysroot
.join("lib")
.join("rustlib")
.join(&target_triple)
.join("target.json");
let p =
sysroot.join("lib").join("rustlib").join(&target_triple).join("target.json");
if p.is_file() {
return load_file(&p);
}