Skip to content

Commit

Permalink
propagate --target to rustc invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 3, 2022
1 parent db32585 commit 822a4ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ fn compile_probe() -> Option<ExitStatus> {
.arg(out_dir)
.arg(probefile);

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

// If Cargo wants to set RUSTFLAGS, use that.
if let Ok(rustflags) = env::var("CARGO_ENCODED_RUSTFLAGS") {
if !rustflags.is_empty() {
Expand Down

0 comments on commit 822a4ed

Please sign in to comment.