Skip to content

Commit

Permalink
Auto merge of #8204 - alexcrichton:rename-flag, r=Eh2406
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed May 4, 2020
2 parents 258c896 + 1840d16 commit ffc2923
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/cargo/core/compiler/build_context/target_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub struct TargetInfo {
/// Extra flags to pass to `rustdoc`, see `env_args`.
pub rustdocflags: Vec<String>,
/// Remove this when it hits stable (1.44)
pub supports_bitcode_in_rlib: Option<bool>,
pub supports_embed_bitcode: Option<bool>,
}

/// Kind of each file generated by a Unit, part of `FileType`.
Expand Down Expand Up @@ -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,
};

Expand Down Expand Up @@ -202,7 +202,7 @@ impl TargetInfo {
"RUSTDOCFLAGS",
)?,
cfg,
supports_bitcode_in_rlib,
supports_embed_bitcode,
})
}

Expand Down
4 changes: 2 additions & 2 deletions src/cargo/core/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
}
Expand Down

0 comments on commit ffc2923

Please sign in to comment.