Skip to content

Commit cb48e3a

Browse files
committed
Change -Cembed-bitcode=no use to -Cbitcode-in-rlib=no.
Because the latter will replace the planned use of the former in rustc.
1 parent f044cf9 commit cb48e3a

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
@@ -41,8 +41,8 @@ pub struct TargetInfo {
4141
pub rustflags: Vec<String>,
4242
/// Extra flags to pass to `rustdoc`, see `env_args`.
4343
pub rustdocflags: Vec<String>,
44-
/// REmove this when it hits stable (1.44)
45-
pub supports_embed_bitcode: Option<bool>,
44+
/// Remove this when it hits stable (1.44)
45+
pub supports_bitcode_in_rlib: Option<bool>,
4646
}
4747

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

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

@@ -196,7 +196,7 @@ impl TargetInfo {
196196
"RUSTDOCFLAGS",
197197
)?,
198198
cfg,
199-
supports_embed_bitcode,
199+
supports_bitcode_in_rlib,
200200
})
201201
}
202202

src/cargo/core/compiler/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -821,10 +821,10 @@ fn build_base_args<'a, 'cfg>(
821821
.bcx
822822
.target_data
823823
.info(CompileKind::Host)
824-
.supports_embed_bitcode
824+
.supports_bitcode_in_rlib
825825
.unwrap()
826826
{
827-
cmd.arg("-Cembed-bitcode=no");
827+
cmd.arg("-Cbitcode-in-rlib=no");
828828
}
829829
}
830830
}

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)