Skip to content

Commit 5b620dc

Browse files
committed
Auto merge of #8134 - nnethercote:bitcode-in-rlib, r=alexcrichton
Change `-Cembed-bitcode=no` use to `-Cbitcode-in-rlib=no`. Because the latter will replace the planned use of the former in rustc.
2 parents 3dcfdef + cb48e3a commit 5b620dc

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/cargo/core/compiler/build_context/target_info.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ pub struct TargetInfo {
4040
pub rustflags: Vec<String>,
4141
/// Extra flags to pass to `rustdoc`, see `env_args`.
4242
pub rustdocflags: Vec<String>,
43-
/// REmove this when it hits stable (1.44)
44-
pub supports_embed_bitcode: Option<bool>,
43+
/// Remove this when it hits stable (1.44)
44+
pub supports_bitcode_in_rlib: Option<bool>,
4545
}
4646

4747
/// Kind of each file generated by a Unit, part of `FileType`.
@@ -104,10 +104,10 @@ impl TargetInfo {
104104
.args(&rustflags)
105105
.env_remove("RUSTC_LOG");
106106

107-
let mut embed_bitcode_test = process.clone();
108-
embed_bitcode_test.arg("-Cembed-bitcode");
109-
let supports_embed_bitcode = match kind {
110-
CompileKind::Host => Some(rustc.cached_output(&embed_bitcode_test).is_ok()),
107+
let mut bitcode_in_rlib_test = process.clone();
108+
bitcode_in_rlib_test.arg("-Cbitcode-in-rlib");
109+
let supports_bitcode_in_rlib = match kind {
110+
CompileKind::Host => Some(rustc.cached_output(&bitcode_in_rlib_test).is_ok()),
111111
_ => None,
112112
};
113113

@@ -195,7 +195,7 @@ impl TargetInfo {
195195
"RUSTDOCFLAGS",
196196
)?,
197197
cfg,
198-
supports_embed_bitcode,
198+
supports_bitcode_in_rlib,
199199
})
200200
}
201201

src/cargo/core/compiler/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -813,10 +813,10 @@ fn build_base_args(
813813
.bcx
814814
.target_data
815815
.info(CompileKind::Host)
816-
.supports_embed_bitcode
816+
.supports_bitcode_in_rlib
817817
.unwrap()
818818
{
819-
cmd.arg("-Cembed-bitcode=no");
819+
cmd.arg("-Cbitcode-in-rlib=no");
820820
}
821821
}
822822
}

tests/testsuite/rustc_info_cache.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::env;
66

77
#[cargo_test]
88
fn rustc_info_cache() {
9-
// TODO: need to gate this on nightly as soon as -Cembed-bitcode lands in
9+
// TODO: need to gate this on nightly as soon as -Cbitcode-in-rlib lands in
1010
// nightly
1111
if true {
1212
return;

0 commit comments

Comments
 (0)