File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,11 @@ pub fn main() {
69
69
exit ( 0 ) ;
70
70
}
71
71
72
+ let mut orig_args: Vec < String > = env:: args ( ) . collect ( ) ;
73
+
72
74
let sys_root = option_env ! ( "SYSROOT" )
73
75
. map ( String :: from)
76
+ . or_else ( || arg_value ( & orig_args, "--sysroot" , |_| true ) . map ( |s| s. to_string ( ) ) )
74
77
. or_else ( || std:: env:: var ( "SYSROOT" ) . ok ( ) )
75
78
. or_else ( || {
76
79
let home = option_env ! ( "RUSTUP_HOME" ) . or ( option_env ! ( "MULTIRUST_HOME" ) ) ;
@@ -90,7 +93,6 @@ pub fn main() {
90
93
91
94
// Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
92
95
// We're invoking the compiler programmatically, so we ignore this/
93
- let mut orig_args: Vec < String > = env:: args ( ) . collect ( ) ;
94
96
if orig_args. len ( ) <= 1 {
95
97
std:: process:: exit ( 1 ) ;
96
98
}
You can’t perform that action at this time.
0 commit comments