Skip to content

Commit 822a4ed

Browse files
committed
propagate --target to rustc invocation
1 parent db32585 commit 822a4ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ fn compile_probe() -> Option<ExitStatus> {
8989
.arg(out_dir)
9090
.arg(probefile);
9191

92+
if let Some(target) = env::var_os("TARGET") {
93+
cmd.arg("--target").arg(target);
94+
}
95+
9296
// If Cargo wants to set RUSTFLAGS, use that.
9397
if let Ok(rustflags) = env::var("CARGO_ENCODED_RUSTFLAGS") {
9498
if !rustflags.is_empty() {

0 commit comments

Comments
 (0)