Skip to content

Commit f490968

Browse files
committed
Remove unnecessary -fembed-bitcode usage now that it's deprecated
This is a partial revert of 6d819a4 because rust-lang/cc-rs#812 removed this flag entirely, meaning we shouldn't have to pass this manually anymore
1 parent 069a4af commit f490968

File tree

1 file changed

+3
-19
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+3
-19
lines changed

src/bootstrap/src/core/build_steps/llvm.rs

+3-19
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ impl Step for Llvm {
484484
cfg.define("LLVM_VERSION_SUFFIX", suffix);
485485
}
486486

487-
configure_cmake(builder, target, &mut cfg, true, ldflags, &[]);
487+
configure_cmake(builder, target, &mut cfg, true, ldflags);
488488
configure_llvm(builder, target, &mut cfg);
489489

490490
for (key, val) in &builder.config.llvm_build_config {
@@ -573,7 +573,6 @@ fn configure_cmake(
573573
cfg: &mut cmake::Config,
574574
use_compiler_launcher: bool,
575575
mut ldflags: LdFlags,
576-
extra_compiler_flags: &[&str],
577576
) {
578577
// Do not print installation messages for up-to-date files.
579578
// LLVM and LLD builds can produce a lot of those and hit CI limits on log size.
@@ -716,9 +715,6 @@ fn configure_cmake(
716715
if builder.config.llvm_clang_cl.is_some() {
717716
cflags.push(&format!(" --target={target}"));
718717
}
719-
for flag in extra_compiler_flags {
720-
cflags.push(&format!(" {flag}"));
721-
}
722718
cfg.define("CMAKE_C_FLAGS", cflags);
723719
let mut cxxflags: OsString = builder.cflags(target, GitRepo::Llvm, CLang::Cxx).join(" ").into();
724720
if let Some(ref s) = builder.config.llvm_cxxflags {
@@ -728,9 +724,6 @@ fn configure_cmake(
728724
if builder.config.llvm_clang_cl.is_some() {
729725
cxxflags.push(&format!(" --target={target}"));
730726
}
731-
for flag in extra_compiler_flags {
732-
cxxflags.push(&format!(" {flag}"));
733-
}
734727
cfg.define("CMAKE_CXX_FLAGS", cxxflags);
735728
if let Some(ar) = builder.ar(target) {
736729
if ar.is_absolute() {
@@ -899,7 +892,7 @@ impl Step for Lld {
899892
ldflags.push_all("-Wl,-rpath,'$ORIGIN/../../../'");
900893
}
901894

902-
configure_cmake(builder, target, &mut cfg, true, ldflags, &[]);
895+
configure_cmake(builder, target, &mut cfg, true, ldflags);
903896
configure_llvm(builder, target, &mut cfg);
904897

905898
// Re-use the same flags as llvm to control the level of debug information
@@ -998,16 +991,7 @@ impl Step for Sanitizers {
998991
// Unfortunately sccache currently lacks support to build them successfully.
999992
// Disable compiler launcher on Darwin targets to avoid potential issues.
1000993
let use_compiler_launcher = !self.target.contains("apple-darwin");
1001-
let extra_compiler_flags: &[&str] =
1002-
if self.target.contains("apple") { &["-fembed-bitcode=off"] } else { &[] };
1003-
configure_cmake(
1004-
builder,
1005-
self.target,
1006-
&mut cfg,
1007-
use_compiler_launcher,
1008-
LdFlags::default(),
1009-
extra_compiler_flags,
1010-
);
994+
configure_cmake(builder, self.target, &mut cfg, use_compiler_launcher, LdFlags::default());
1011995

1012996
t!(fs::create_dir_all(&out_dir));
1013997
cfg.out_dir(out_dir);

0 commit comments

Comments
 (0)