Skip to content

Commit cff63be

Browse files
committed
Move ELF compression related libraries to configure_llvm so those options also apply to lld.
1 parent a15bb43 commit cff63be

File tree

1 file changed

+10
-10
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -368,16 +368,6 @@ impl Step for Llvm {
368368
cfg.define("LLVM_PROFDATA_FILE", path);
369369
}
370370

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-
381371
// Are we compiling for iOS/tvOS/watchOS/visionOS?
382372
if target.contains("apple-ios")
383373
|| target.contains("apple-tvos")
@@ -825,6 +815,16 @@ fn configure_llvm(builder: &Builder<'_>, target: TargetSelection, cfg: &mut cmak
825815
}
826816
}
827817

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+
828828
if let Some(ref linker) = builder.config.llvm_use_linker {
829829
cfg.define("LLVM_USE_LINKER", linker);
830830
}

0 commit comments

Comments
 (0)