diff --git a/crates/proc-macro-test/build.rs b/crates/proc-macro-test/build.rs index 19a5caa4cc..7827157865 100644 --- a/crates/proc-macro-test/build.rs +++ b/crates/proc-macro-test/build.rs @@ -71,6 +71,10 @@ fn main() { .arg("--target-dir") .arg(&target_dir); + if let Ok(target) = std::env::var("TARGET") { + cmd.args(["--target", &target]); + } + println!("Running {cmd:?}"); let output = cmd.output().unwrap();