Skip to content

Commit

Permalink
Use RUSTC_WRAPPER instead of CARGO_RUSTC_WRAPPER. (#303)
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 committed Mar 18, 2023
1 parent f0cc202 commit ef3493b
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 ef3493b

Please sign in to comment.