From 0f6bcb797a8be743f6c60e20d3e0e324a89372c9 Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Mon, 17 Aug 2020 21:44:34 +0100 Subject: [PATCH] Link to zlib while cross-compiling LLVM on Haiku PR #72696 enabled the option LLVM_ENABLE_ZLIB for the LLVM builds. On Haiku, zlib is linked as a shared library. When cross-compiling LLVM, rustbuild should be instructed to explicitly linking to libz. --- src/librustc_llvm/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs index a45028eafe1c4..306ffbf5daab4 100644 --- a/src/librustc_llvm/build.rs +++ b/src/librustc_llvm/build.rs @@ -198,7 +198,7 @@ fn main() { } else if target.contains("windows-gnu") { println!("cargo:rustc-link-lib=shell32"); println!("cargo:rustc-link-lib=uuid"); - } else if target.contains("netbsd") { + } else if target.contains("netbsd") || target.contains("haiku") { println!("cargo:rustc-link-lib=z"); } cmd.args(&components);