Skip to content

Commit

Permalink
fix: use RUST_WORKSPACE_WRAPPER in compile probe
Browse files Browse the repository at this point in the history
  • Loading branch information
ten3roberts committed Apr 25, 2024
1 parent f80de3e commit 92b6a57
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions eyre/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ fn compile_probe(probe: &str) -> Option<ExitStatus> {
let probefile = Path::new(&out_dir).join("probe.rs");
fs::write(&probefile, probe).ok()?;

// Supports invoking rustc thrugh a wrapper
let mut cmd = if let Some(wrapper) = env::var_os("RUSTC_WRAPPER") {
let mut cmd = Command::new(wrapper);

cmd.arg(rustc);

cmd
} else {
Command::new(rustc)
};
let rustc_wrapper = env::var_os("RUSTC_WRAPPER").filter(|wrapper| !wrapper.is_empty());
let rustc_workspace_wrapper =
env::var_os("RUSTC_WORKSPACE_WRAPPER").filter(|wrapper| !wrapper.is_empty());
let mut rustc = rustc_wrapper
.into_iter()
.chain(rustc_workspace_wrapper)
.chain(std::iter::once(rustc));

let mut cmd = Command::new(rustc.next().unwrap());
cmd.args(rustc);

if let Some(target) = env::var_os("TARGET") {
cmd.arg("--target").arg(target);
Expand Down

0 comments on commit 92b6a57

Please sign in to comment.