From 1840d1631d225495228c387ae13932a8cb3c5f1a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 4 May 2020 10:53:18 -0700 Subject: [PATCH] Rename bitcode-in-rlib flag to embed-bitcode This flag changed names in nightly, so let's rename it here in Cargo to get our CI passing and enable the same wins for avoiding bitcode. --- src/cargo/core/compiler/build_context/target_info.rs | 12 ++++++------ src/cargo/core/compiler/mod.rs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cargo/core/compiler/build_context/target_info.rs b/src/cargo/core/compiler/build_context/target_info.rs index 28d9589e1ef..8258f4d8853 100644 --- a/src/cargo/core/compiler/build_context/target_info.rs +++ b/src/cargo/core/compiler/build_context/target_info.rs @@ -41,7 +41,7 @@ pub struct TargetInfo { /// Extra flags to pass to `rustdoc`, see `env_args`. pub rustdocflags: Vec, /// Remove this when it hits stable (1.44) - pub supports_bitcode_in_rlib: Option, + pub supports_embed_bitcode: Option, } /// Kind of each file generated by a Unit, part of `FileType`. @@ -111,10 +111,10 @@ impl TargetInfo { .args(&rustflags) .env_remove("RUSTC_LOG"); - let mut bitcode_in_rlib_test = process.clone(); - bitcode_in_rlib_test.arg("-Cbitcode-in-rlib"); - let supports_bitcode_in_rlib = match kind { - CompileKind::Host => Some(rustc.cached_output(&bitcode_in_rlib_test).is_ok()), + let mut embed_bitcode_test = process.clone(); + embed_bitcode_test.arg("-Cembed-bitcode"); + let supports_embed_bitcode = match kind { + CompileKind::Host => Some(rustc.cached_output(&embed_bitcode_test).is_ok()), _ => None, }; @@ -202,7 +202,7 @@ impl TargetInfo { "RUSTDOCFLAGS", )?, cfg, - supports_bitcode_in_rlib, + supports_embed_bitcode, }) } diff --git a/src/cargo/core/compiler/mod.rs b/src/cargo/core/compiler/mod.rs index cce5301cd48..c5b09373e07 100644 --- a/src/cargo/core/compiler/mod.rs +++ b/src/cargo/core/compiler/mod.rs @@ -815,10 +815,10 @@ fn build_base_args( .bcx .target_data .info(CompileKind::Host) - .supports_bitcode_in_rlib + .supports_embed_bitcode .unwrap() { - cmd.arg("-Cbitcode-in-rlib=no"); + cmd.arg("-Cembed-bitcode=no"); } } }