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 @@ -72,8 +72,11 @@ pub fn main() {
72
72
exit ( 0 ) ;
73
73
}
74
74
75
+ let mut orig_args: Vec < String > = env:: args ( ) . collect ( ) ;
76
+
75
77
let sys_root = option_env ! ( "SYSROOT" )
76
78
. map ( String :: from)
79
+ . or_else ( || arg_value ( & orig_args, "--sysroot" , |_| true ) . map ( |s| s. to_string ( ) ) )
77
80
. or_else ( || std:: env:: var ( "SYSROOT" ) . ok ( ) )
78
81
. or_else ( || {
79
82
let home = option_env ! ( "RUSTUP_HOME" ) . or ( option_env ! ( "MULTIRUST_HOME" ) ) ;
@@ -93,7 +96,6 @@ pub fn main() {
93
96
94
97
// Setting RUSTC_WRAPPER causes Cargo to pass 'rustc' as the first argument.
95
98
// We're invoking the compiler programmatically, so we ignore this/
96
- let mut orig_args: Vec < String > = env:: args ( ) . collect ( ) ;
97
99
if orig_args. len ( ) <= 1 {
98
100
std:: process:: exit ( 1 ) ;
99
101
}
You can’t perform that action at this time.
0 commit comments