Skip to content

Commit ffc2923

Browse files
committed
Auto merge of #8204 - alexcrichton:rename-flag, r=Eh2406
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.
2 parents 258c896 + 1840d16 commit ffc2923

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub struct TargetInfo {
4141
/// Extra flags to pass to `rustdoc`, see `env_args`.
4242
pub rustdocflags: Vec<String>,
4343
/// Remove this when it hits stable (1.44)
44-
pub supports_bitcode_in_rlib: Option<bool>,
44+
pub supports_embed_bitcode: Option<bool>,
4545
}
4646

4747
/// Kind of each file generated by a Unit, part of `FileType`.
@@ -111,10 +111,10 @@ impl TargetInfo {
111111
.args(&rustflags)
112112
.env_remove("RUSTC_LOG");
113113

114-
let mut bitcode_in_rlib_test = process.clone();
115-
bitcode_in_rlib_test.arg("-Cbitcode-in-rlib");
116-
let supports_bitcode_in_rlib = match kind {
117-
CompileKind::Host => Some(rustc.cached_output(&bitcode_in_rlib_test).is_ok()),
114+
let mut embed_bitcode_test = process.clone();
115+
embed_bitcode_test.arg("-Cembed-bitcode");
116+
let supports_embed_bitcode = match kind {
117+
CompileKind::Host => Some(rustc.cached_output(&embed_bitcode_test).is_ok()),
118118
_ => None,
119119
};
120120

@@ -202,7 +202,7 @@ impl TargetInfo {
202202
"RUSTDOCFLAGS",
203203
)?,
204204
cfg,
205-
supports_bitcode_in_rlib,
205+
supports_embed_bitcode,
206206
})
207207
}
208208

src/cargo/core/compiler/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,10 +815,10 @@ fn build_base_args(
815815
.bcx
816816
.target_data
817817
.info(CompileKind::Host)
818-
.supports_bitcode_in_rlib
818+
.supports_embed_bitcode
819819
.unwrap()
820820
{
821-
cmd.arg("-Cbitcode-in-rlib=no");
821+
cmd.arg("-Cembed-bitcode=no");
822822
}
823823
}
824824
}

0 commit comments

Comments
 (0)