Skip to content

Commit

Permalink
Enable LLVM zlib when building LLD
Browse files Browse the repository at this point in the history
  • Loading branch information
Jethro Beekman committed Jun 11, 2020
1 parent feb3536 commit 8caa14f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ impl Step for Llvm {
.define("LLVM_INCLUDE_TESTS", "OFF")
.define("LLVM_INCLUDE_DOCS", "OFF")
.define("LLVM_INCLUDE_BENCHMARKS", "OFF")
.define("LLVM_ENABLE_ZLIB", "OFF")
.define("WITH_POLLY", "OFF")
.define("LLVM_ENABLE_TERMINFO", "OFF")
.define("LLVM_ENABLE_LIBEDIT", "OFF")
Expand All @@ -168,6 +167,14 @@ impl Step for Llvm {
.define("LLVM_TARGET_ARCH", target.split('-').next().unwrap())
.define("LLVM_DEFAULT_TARGET_TRIPLE", target);

if !target.contains("netbsd") {
cfg.define("LLVM_ENABLE_ZLIB", "ON");
} else {
// FIXME: Enable zlib on NetBSD too
// https://github.com/rust-lang/rust/pull/72696#issuecomment-641517185
cfg.define("LLVM_ENABLE_ZLIB", "OFF");
}

if builder.config.llvm_thin_lto {
cfg.define("LLVM_ENABLE_LTO", "Thin");
if !target.contains("apple") {
Expand Down

0 comments on commit 8caa14f

Please sign in to comment.