mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-29 06:23:25 +00:00
proc-macro-test: Pass target to cargo invocation
When cross compiling macos → dragonfly the dist build fails in the proc-maro-test-impl crate with the following error: ld: unknown option: -z\nclang: error: linker command failed with exit code 1 (use -v to see invocation) This appears to be a wart stemming from using an Apple host for cross compiling. Passing the target along to cargo allows it to pick up a linker that it understands and DTRT.
This commit is contained in:
parent
d398ad3326
commit
c5d4f7339a
1 changed files with 4 additions and 0 deletions
|
@ -71,6 +71,10 @@ fn main() {
|
||||||
.arg("--target-dir")
|
.arg("--target-dir")
|
||||||
.arg(&target_dir);
|
.arg(&target_dir);
|
||||||
|
|
||||||
|
if let Ok(target) = std::env::var("TARGET") {
|
||||||
|
cmd.args(["--target", &target]);
|
||||||
|
}
|
||||||
|
|
||||||
println!("Running {cmd:?}");
|
println!("Running {cmd:?}");
|
||||||
|
|
||||||
let output = cmd.output().unwrap();
|
let output = cmd.output().unwrap();
|
||||||
|
|
Loading…
Reference in a new issue