File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ fn compile_probe() -> Option<ExitStatus> {
71
71
fs:: write ( & probefile, PROBE ) . ok ( ) ?;
72
72
73
73
// Make sure to pick up Cargo rustc configuration.
74
- let mut cmd = if let Some ( wrapper) = env:: var_os ( "CARGO_RUSTC_WRAPPER " ) {
74
+ let mut cmd = if let Some ( wrapper) = env:: var_os ( "RUSTC_WRAPPER " ) {
75
75
let mut cmd = Command :: new ( wrapper) ;
76
76
// The wrapper's first argument is supposed to be the path to rustc.
77
77
cmd. arg ( rustc) ;
@@ -89,6 +89,10 @@ fn compile_probe() -> Option<ExitStatus> {
89
89
. arg ( out_dir)
90
90
. arg ( probefile) ;
91
91
92
+ if let Some ( target) = env:: var_os ( "TARGET" ) {
93
+ cmd. arg ( "--target" ) . arg ( target) ;
94
+ }
95
+
92
96
// If Cargo wants to set RUSTFLAGS, use that.
93
97
if let Ok ( rustflags) = env:: var ( "CARGO_ENCODED_RUSTFLAGS" ) {
94
98
if !rustflags. is_empty ( ) {
You can’t perform that action at this time.
0 commit comments