@@ -534,7 +534,7 @@ impl Step for Llvm {
534
534
cfg. define ( "LLVM_VERSION_SUFFIX" , suffix) ;
535
535
}
536
536
537
- configure_cmake ( builder, target, & mut cfg, true , ldflags, & [ ] ) ;
537
+ configure_cmake ( builder, target, & mut cfg, true , ldflags) ;
538
538
configure_llvm ( builder, target, & mut cfg) ;
539
539
540
540
for ( key, val) in & builder. config . llvm_build_config {
@@ -623,7 +623,6 @@ fn configure_cmake(
623
623
cfg : & mut cmake:: Config ,
624
624
use_compiler_launcher : bool ,
625
625
mut ldflags : LdFlags ,
626
- suppressed_compiler_flag_prefixes : & [ & str ] ,
627
626
) {
628
627
// Do not print installation messages for up-to-date files.
629
628
// LLVM and LLD builds can produce a lot of those and hit CI limits on log size.
@@ -757,17 +756,8 @@ fn configure_cmake(
757
756
}
758
757
759
758
cfg. build_arg ( "-j" ) . build_arg ( builder. jobs ( ) . to_string ( ) ) ;
760
- let mut cflags: OsString = builder
761
- . extra_cflags ( target, GitRepo :: Llvm , CLang :: C )
762
- . into_iter ( )
763
- . filter ( |flag| {
764
- !suppressed_compiler_flag_prefixes
765
- . iter ( )
766
- . any ( |suppressed_prefix| flag. starts_with ( suppressed_prefix) )
767
- } )
768
- . collect :: < Vec < String > > ( )
769
- . join ( " " )
770
- . into ( ) ;
759
+ let mut cflags: OsString =
760
+ builder. extra_cflags ( target, GitRepo :: Llvm , CLang :: C ) . join ( " " ) . into ( ) ;
771
761
if let Some ( ref s) = builder. config . llvm_cflags {
772
762
cflags. push ( " " ) ;
773
763
cflags. push ( s) ;
@@ -777,17 +767,8 @@ fn configure_cmake(
777
767
cflags. push ( format ! ( " --target={target}" ) ) ;
778
768
}
779
769
cfg. define ( "CMAKE_C_FLAGS" , cflags) ;
780
- let mut cxxflags: OsString = builder
781
- . extra_cflags ( target, GitRepo :: Llvm , CLang :: Cxx )
782
- . into_iter ( )
783
- . filter ( |flag| {
784
- !suppressed_compiler_flag_prefixes
785
- . iter ( )
786
- . any ( |suppressed_prefix| flag. starts_with ( suppressed_prefix) )
787
- } )
788
- . collect :: < Vec < String > > ( )
789
- . join ( " " )
790
- . into ( ) ;
770
+ let mut cxxflags: OsString =
771
+ builder. extra_cflags ( target, GitRepo :: Llvm , CLang :: Cxx ) . join ( " " ) . into ( ) ;
791
772
if let Some ( ref s) = builder. config . llvm_cxxflags {
792
773
cxxflags. push ( " " ) ;
793
774
cxxflags. push ( s) ;
@@ -950,7 +931,7 @@ impl Step for Enzyme {
950
931
// FIXME(ZuseZ4): Find a nicer way to use Enzyme Debug builds
951
932
//cfg.profile("Debug");
952
933
//cfg.define("CMAKE_BUILD_TYPE", "Debug");
953
- configure_cmake ( builder, target, & mut cfg, true , LdFlags :: default ( ) , & [ ] ) ;
934
+ configure_cmake ( builder, target, & mut cfg, true , LdFlags :: default ( ) ) ;
954
935
955
936
// Re-use the same flags as llvm to control the level of debug information
956
937
// generated for lld.
@@ -1065,7 +1046,7 @@ impl Step for Lld {
1065
1046
ldflags. push_all ( "-Wl,-rpath,'$ORIGIN/../../../'" ) ;
1066
1047
}
1067
1048
1068
- configure_cmake ( builder, target, & mut cfg, true , ldflags, & [ ] ) ;
1049
+ configure_cmake ( builder, target, & mut cfg, true , ldflags) ;
1069
1050
configure_llvm ( builder, target, & mut cfg) ;
1070
1051
1071
1052
// Re-use the same flags as llvm to control the level of debug information
@@ -1164,20 +1145,7 @@ impl Step for Sanitizers {
1164
1145
// Unfortunately sccache currently lacks support to build them successfully.
1165
1146
// Disable compiler launcher on Darwin targets to avoid potential issues.
1166
1147
let use_compiler_launcher = !self . target . contains ( "apple-darwin" ) ;
1167
- // Since v1.0.86, the cc crate adds -mmacosx-version-min to the default
1168
- // flags on MacOS. A long-standing bug in the CMake rules for compiler-rt
1169
- // causes architecture detection to be skipped when this flag is present,
1170
- // and compilation fails. https://github.com/llvm/llvm-project/issues/88780
1171
- let suppressed_compiler_flag_prefixes: & [ & str ] =
1172
- if self . target . contains ( "apple-darwin" ) { & [ "-mmacosx-version-min=" ] } else { & [ ] } ;
1173
- configure_cmake (
1174
- builder,
1175
- self . target ,
1176
- & mut cfg,
1177
- use_compiler_launcher,
1178
- LdFlags :: default ( ) ,
1179
- suppressed_compiler_flag_prefixes,
1180
- ) ;
1148
+ configure_cmake ( builder, self . target , & mut cfg, use_compiler_launcher, LdFlags :: default ( ) ) ;
1181
1149
1182
1150
t ! ( fs:: create_dir_all( & out_dir) ) ;
1183
1151
cfg. out_dir ( out_dir) ;
0 commit comments