Skip to content

Commit 2a2be9a

Browse files
committed
Auto merge of #75713 - mati865:netbsd_zlib, r=Mark-Simulacrum
Enable zlib for NetBSD NetBSD Docker dist job passed locally.
2 parents 7fc048f + 985df3d commit 2a2be9a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/bootstrap/native.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,9 @@ impl Step for Llvm {
178178
.define("LLVM_TARGET_ARCH", target_native.split('-').next().unwrap())
179179
.define("LLVM_DEFAULT_TARGET_TRIPLE", target_native);
180180

181-
if !target.contains("netbsd") && target != "aarch64-apple-darwin" {
181+
if target != "aarch64-apple-darwin" {
182182
cfg.define("LLVM_ENABLE_ZLIB", "ON");
183183
} else {
184-
// FIXME: Enable zlib on NetBSD too
185-
// https://github.com/rust-lang/rust/pull/72696#issuecomment-641517185
186184
cfg.define("LLVM_ENABLE_ZLIB", "OFF");
187185
}
188186

src/librustc_llvm/build.rs

+2
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ fn main() {
198198
} else if target.contains("windows-gnu") {
199199
println!("cargo:rustc-link-lib=shell32");
200200
println!("cargo:rustc-link-lib=uuid");
201+
} else if target.contains("netbsd") {
202+
println!("cargo:rustc-link-lib=z");
201203
}
202204
cmd.args(&components);
203205

0 commit comments

Comments
 (0)