Skip to content

Commit

Permalink
Misc cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Sep 13, 2024
1 parent bc67321 commit d5e2e23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 3 additions & 4 deletions build_system/abi_cafe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ pub(crate) fn run(

eprintln!("Running abi-cafe");

let pairs = ["rustc_calls_cgclif", "cgclif_calls_rustc", "cgclif_calls_cc", "cc_calls_cgclif"];
let pairs =
let pairs: &[_] =
if cfg!(not(any(target_os = "macos", all(target_os = "windows", target_env = "msvc")))) {
&pairs[..]
&["rustc_calls_cgclif", "cgclif_calls_rustc", "cgclif_calls_cc", "cc_calls_cgclif"]
} else {
&pairs[..2]
&["rustc_calls_cgclif", "cgclif_calls_rustc"]
};

let mut cmd = ABI_CAFE.run(bootstrap_host_compiler, dirs);
Expand Down
4 changes: 1 addition & 3 deletions build_system/build_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pub(crate) fn build_backend(
let mut cmd = CG_CLIF.build(&bootstrap_host_compiler, dirs);

let mut rustflags = rustflags_from_env("RUSTFLAGS");

rustflags.push("-Zallow-features=rustc_private".to_owned());
rustflags_to_cmd_env(&mut cmd, "RUSTFLAGS", &rustflags);

if env::var("CG_CLIF_EXPENSIVE_CHECKS").is_ok() {
// Enabling debug assertions implicitly enables the clif ir verifier
Expand All @@ -33,8 +33,6 @@ pub(crate) fn build_backend(

cmd.arg("--release");

rustflags_to_cmd_env(&mut cmd, "RUSTFLAGS", &rustflags);

eprintln!("[BUILD] rustc_codegen_cranelift");
crate::utils::spawn_and_wait(cmd);

Expand Down

0 comments on commit d5e2e23

Please sign in to comment.