diff --git a/build_system/abi_cafe.rs b/build_system/abi_cafe.rs index b7d7e011308..5e4bf070eb7 100644 --- a/build_system/abi_cafe.rs +++ b/build_system/abi_cafe.rs @@ -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); diff --git a/build_system/build_backend.rs b/build_system/build_backend.rs index dfbf900b2ee..02da89f737c 100644 --- a/build_system/build_backend.rs +++ b/build_system/build_backend.rs @@ -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 @@ -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);