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 7a3b1e2 commit 7d9799fCopy full SHA for 7d9799f
src/driver.rs
@@ -72,8 +72,11 @@ pub fn main() {
72
exit(0);
73
}
74
75
+ let mut orig_args: Vec<String> = env::args().collect();
76
+
77
let sys_root = option_env!("SYSROOT")
78
.map(String::from)
79
+ .or_else(|| arg_value(&orig_args, "--sysroot", |_| true).map(|s| s.to_string()))
80
.or_else(|| std::env::var("SYSROOT").ok())
81
.or_else(|| {
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/
- let mut orig_args: Vec<String> = env::args().collect();
99
if orig_args.len() <= 1 {
100
std::process::exit(1);
101
0 commit comments