Skip to content

Commit 474bee7

Browse files
committed
Auto merge of rust-lang#118014 - keith:ks/remove-unnecessary-fembed-bitcode-usage-now-that-it-s-deprecated, r=clubby789
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
2 parents 75cb5c5 + 096a08e commit 474bee7

File tree

1 file changed

+2
-12
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+2
-12
lines changed

Diff for: src/bootstrap/src/core/build_steps/llvm.rs

+2-12
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ impl Step for Llvm {
508508
cfg.define("LLVM_VERSION_SUFFIX", suffix);
509509
}
510510

511-
configure_cmake(builder, target, &mut cfg, true, ldflags, &[], &[]);
511+
configure_cmake(builder, target, &mut cfg, true, ldflags, &[]);
512512
configure_llvm(builder, target, &mut cfg);
513513

514514
for (key, val) in &builder.config.llvm_build_config {
@@ -597,7 +597,6 @@ fn configure_cmake(
597597
cfg: &mut cmake::Config,
598598
use_compiler_launcher: bool,
599599
mut ldflags: LdFlags,
600-
extra_compiler_flags: &[&str],
601600
suppressed_compiler_flag_prefixes: &[&str],
602601
) {
603602
// Do not print installation messages for up-to-date files.
@@ -751,9 +750,6 @@ fn configure_cmake(
751750
if builder.config.llvm_clang_cl.is_some() {
752751
cflags.push(&format!(" --target={target}"));
753752
}
754-
for flag in extra_compiler_flags {
755-
cflags.push(&format!(" {flag}"));
756-
}
757753
cfg.define("CMAKE_C_FLAGS", cflags);
758754
let mut cxxflags: OsString = builder
759755
.cflags(target, GitRepo::Llvm, CLang::Cxx)
@@ -773,9 +769,6 @@ fn configure_cmake(
773769
if builder.config.llvm_clang_cl.is_some() {
774770
cxxflags.push(&format!(" --target={target}"));
775771
}
776-
for flag in extra_compiler_flags {
777-
cxxflags.push(&format!(" {flag}"));
778-
}
779772
cfg.define("CMAKE_CXX_FLAGS", cxxflags);
780773
if let Some(ar) = builder.ar(target) {
781774
if ar.is_absolute() {
@@ -944,7 +937,7 @@ impl Step for Lld {
944937
ldflags.push_all("-Wl,-rpath,'$ORIGIN/../../../'");
945938
}
946939

947-
configure_cmake(builder, target, &mut cfg, true, ldflags, &[], &[]);
940+
configure_cmake(builder, target, &mut cfg, true, ldflags, &[]);
948941
configure_llvm(builder, target, &mut cfg);
949942

950943
// Re-use the same flags as llvm to control the level of debug information
@@ -1043,8 +1036,6 @@ impl Step for Sanitizers {
10431036
// Unfortunately sccache currently lacks support to build them successfully.
10441037
// Disable compiler launcher on Darwin targets to avoid potential issues.
10451038
let use_compiler_launcher = !self.target.contains("apple-darwin");
1046-
let extra_compiler_flags: &[&str] =
1047-
if self.target.contains("apple") { &["-fembed-bitcode=off"] } else { &[] };
10481039
// Since v1.0.86, the cc crate adds -mmacosx-version-min to the default
10491040
// flags on MacOS. A long-standing bug in the CMake rules for compiler-rt
10501041
// causes architecture detection to be skipped when this flag is present,
@@ -1057,7 +1048,6 @@ impl Step for Sanitizers {
10571048
&mut cfg,
10581049
use_compiler_launcher,
10591050
LdFlags::default(),
1060-
extra_compiler_flags,
10611051
suppressed_compiler_flag_prefixes,
10621052
);
10631053

0 commit comments

Comments
 (0)