Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename bitcode-in-rlib flag to embed-bitcode #8204

Merged
merged 1 commit into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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