@@ -368,16 +368,6 @@ impl Step for Llvm {
368
368
cfg. define ( "LLVM_PROFDATA_FILE" , path) ;
369
369
}
370
370
371
- // Libraries for ELF compression.
372
- if !target. is_windows ( ) {
373
- cfg. define ( "LLVM_ENABLE_ZLIB" , "ON" ) ;
374
- cfg. define ( "LLVM_ENABLE_ZSTD" , "ON" ) ;
375
- cfg. define ( "LLVM_USE_STATIC_ZSTD" , "TRUE" ) ;
376
- } else {
377
- cfg. define ( "LLVM_ENABLE_ZLIB" , "OFF" ) ;
378
- cfg. define ( "LLVM_ENABLE_ZSTD" , "OFF" ) ;
379
- }
380
-
381
371
// Are we compiling for iOS/tvOS/watchOS/visionOS?
382
372
if target. contains ( "apple-ios" )
383
373
|| target. contains ( "apple-tvos" )
@@ -825,6 +815,16 @@ fn configure_llvm(builder: &Builder<'_>, target: TargetSelection, cfg: &mut cmak
825
815
}
826
816
}
827
817
818
+ // Libraries for ELF section compression.
819
+ if !target. is_windows ( ) {
820
+ cfg. define ( "LLVM_ENABLE_ZLIB" , "ON" ) ;
821
+ cfg. define ( "LLVM_ENABLE_ZSTD" , "ON" ) ;
822
+ cfg. define ( "LLVM_USE_STATIC_ZSTD" , "TRUE" ) ;
823
+ } else {
824
+ cfg. define ( "LLVM_ENABLE_ZLIB" , "OFF" ) ;
825
+ cfg. define ( "LLVM_ENABLE_ZSTD" , "OFF" ) ;
826
+ }
827
+
828
828
if let Some ( ref linker) = builder. config . llvm_use_linker {
829
829
cfg. define ( "LLVM_USE_LINKER" , linker) ;
830
830
}
0 commit comments