diff --git a/build.rs b/build.rs index cac0aeb36..a8e59615e 100644 --- a/build.rs +++ b/build.rs @@ -229,8 +229,8 @@ fn can_compile>(test: T) -> bool { .arg("--emit=metadata") // Do as little as possible but still parse. .arg("--target") .arg(target) - .arg("--out-dir") - .arg(out_dir); // Put the output somewhere inconsequential. + .arg("-o") + .arg("/dev/null"); // We don't care about the output (only whether it builds or not) // If Cargo wants to set RUSTFLAGS, use that. if let Ok(rustflags) = var("CARGO_ENCODED_RUSTFLAGS") {