Skip to content

Commit

Permalink
Touch up PR 157
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 14, 2021
1 parent a3aba77 commit f810816
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions build.rs
Expand Up @@ -69,15 +69,14 @@ fn compile_probe() -> Option<ExitStatus> {
fs::write(&probefile, PROBE).ok()?;

// Make sure to pick up Cargo rustc configuration.
let mut cmd = env::var_os("CARGO_RUSTC_WRAPPER").map_or_else(
|| Command::new(&rustc),
|wrapper| {
let mut cmd = Command::new(wrapper);
// The wrapper's first argument should always be the path to rustc.
cmd.arg(&rustc);
cmd
},
);
let mut cmd = if let Some(wrapper) = env::var_os("CARGO_RUSTC_WRAPPER") {
let mut cmd = Command::new(wrapper);
// The wrapper's first argument is supposed to be the path to rustc.
cmd.arg(rustc);
cmd
} else {
Command::new(rustc)
};

cmd.stderr(Stdio::null())
.arg("--edition=2018")
Expand Down

0 comments on commit f810816

Please sign in to comment.