Skip to content

Commit 3f62540

Browse files
committed
Only set CFG_COMPILER_HOST_TRIPLE when building rustc
1 parent e947492 commit 3f62540

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/bootstrap/src/core/build_steps/compile.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,9 @@ pub fn rustc_cargo_env(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetS
13781378
}
13791379
}
13801380

1381+
// The host this new compiler will *run* on.
1382+
cargo.env("CFG_COMPILER_HOST_TRIPLE", target.triple);
1383+
13811384
if builder.config.rust_verify_llvm_ir {
13821385
cargo.env("RUSTC_VERIFY_LLVM_IR", "1");
13831386
}

src/bootstrap/src/core/builder/cargo.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,8 +1288,6 @@ impl Builder<'_> {
12881288
//
12891289
// FIXME: should update code to not require this env var
12901290

1291-
// The host this new compiler will *run* on.
1292-
cargo.env("CFG_COMPILER_HOST_TRIPLE", target.triple);
12931291
// The host this new compiler is being *built* on.
12941292
cargo.env("CFG_COMPILER_BUILD_TRIPLE", compiler.host.triple);
12951293

0 commit comments

Comments
 (0)