We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 227c72d commit 132c086Copy full SHA for 132c086
src/driver.rs
@@ -69,8 +69,11 @@ pub fn main() {
69
exit(0);
70
}
71
72
+ let mut orig_args: Vec<String> = env::args().collect();
73
+
74
let sys_root = option_env!("SYSROOT")
75
.map(String::from)
76
+ .or_else(|| arg_value(&orig_args, "--sysroot", |_| true).map(|s| s.to_string()))
77
.or_else(|| std::env::var("SYSROOT").ok())
78
.or_else(|| {
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/
- let mut orig_args: Vec<String> = env::args().collect();
96
if orig_args.len() <= 1 {
97
std::process::exit(1);
98
0 commit comments