Skip to content

Commit 0fe0781

Browse files
committed
Disable debug info when compiling smoke test to detect system zlib
When compiling for Apple platforms, with the output set to /dev/null, the test fails because clang invokes dsymutil on the output, and that fails on /dev/null. clang doesn't invoke dsymutil if compiling without debug info.
1 parent ac242af commit 0fe0781

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

build.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,11 @@ fn try_vcpkg() -> bool {
184184

185185
fn zlib_installed(cfg: &mut cc::Build) -> bool {
186186
let mut cmd = cfg.get_compiler().to_command();
187-
cmd.arg("src/smoke.c").arg("-o").arg("/dev/null").arg("-lz");
187+
cmd.arg("src/smoke.c")
188+
.arg("-o")
189+
.arg("-g0")
190+
.arg("/dev/null")
191+
.arg("-lz");
188192

189193
println!("running {:?}", cmd);
190194
if let Ok(status) = cmd.status() {

0 commit comments

Comments
 (0)