Skip to content

Commit

Permalink
Use RUSTC_WRAPPER instead of CARGO_RUSTC_WRAPPER. (#303) (#304)
Browse files Browse the repository at this point in the history
Similar to dtolnay/anyhow#248, and as suggested [here], check `RUSTC_WRAPPER` instead of `CARGO_RUSTC_WRAPPER`.

[here]: bytecodealliance/rustix#544 (comment)
  • Loading branch information
sunfishcode authored Mar 18, 2023
1 parent 6684aa1 commit 9a6f137
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn can_compile<T: AsRef<str>>(test: T) -> bool {
let rustc = var("RUSTC").unwrap();
let target = var("TARGET").unwrap();

let mut cmd = if let Ok(wrapper) = var("CARGO_RUSTC_WRAPPER") {
let mut cmd = if let Ok(wrapper) = var("RUSTC_WRAPPER") {
let mut cmd = std::process::Command::new(wrapper);
// The wrapper's first argument is supposed to be the path to rustc.
cmd.arg(rustc);
Expand Down

0 comments on commit 9a6f137

Please sign in to comment.