File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -69,16 +69,16 @@ fn compile_probe(probe: &str) -> Option<ExitStatus> {
69
69
let probefile = Path :: new ( & out_dir) . join ( "probe.rs" ) ;
70
70
fs:: write ( & probefile, probe) . ok ( ) ?;
71
71
72
- // Supports invoking rustc thrugh a wrapper
73
- let mut cmd = if let Some ( wrapper ) = env :: var_os ( "RUSTC_WRAPPER" ) {
74
- let mut cmd = Command :: new ( wrapper) ;
75
-
76
- cmd . arg ( rustc ) ;
77
-
78
- cmd
79
- } else {
80
- Command :: new ( rustc)
81
- } ;
72
+ let rustc_wrapper = env :: var_os ( "RUSTC_WRAPPER" ) . filter ( |wrapper| ! wrapper. is_empty ( ) ) ;
73
+ let rustc_workspace_wrapper =
74
+ env :: var_os ( "RUSTC_WORKSPACE_WRAPPER" ) . filter ( | wrapper| !wrapper . is_empty ( ) ) ;
75
+ let mut rustc = rustc_wrapper
76
+ . into_iter ( )
77
+ . chain ( rustc_workspace_wrapper )
78
+ . chain ( std :: iter :: once ( rustc ) ) ;
79
+
80
+ let mut cmd = Command :: new ( rustc. next ( ) . unwrap ( ) ) ;
81
+ cmd . args ( rustc ) ;
82
82
83
83
if let Some ( target) = env:: var_os ( "TARGET" ) {
84
84
cmd. arg ( "--target" ) . arg ( target) ;
You can’t perform that action at this time.
0 commit comments