diff --git a/build.rs b/build.rs index 5440b6038..155141952 100644 --- a/build.rs +++ b/build.rs @@ -258,7 +258,7 @@ fn can_compile>(test: T) -> bool { .arg("--target") .arg(target) .arg("-o") - .arg("-") + .arg(std::env::temp_dir().join("rustix_test_can_compile")) .stdout(Stdio::null()); // We don't care about the output (only whether it builds or not) // If Cargo wants to set RUSTFLAGS, use that.