Skip to content

Commit a482658

Browse files
committed
Remove probe_sysroot
rust-lang/rust#103660 makes this unnecessary. Closes #2
1 parent 61e7282 commit a482658

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

src/main.rs

+1-18
Original file line numberDiff line numberDiff line change
@@ -102,26 +102,9 @@ impl Callbacks for MyCallbacks {
102102
}
103103
}
104104

105-
fn probe_sysroot() -> String {
106-
std::process::Command::new("rustc")
107-
.arg("+1.68.2")
108-
.arg("--print")
109-
.arg("sysroot")
110-
.output()
111-
.ok()
112-
.and_then(|out| String::from_utf8(out.stdout).ok())
113-
.map(|x| x.trim().to_owned())
114-
.expect("failed to probe rust sysroot")
115-
}
116-
117105
fn main() -> ExitCode {
118106
rustc_driver::init_env_logger("KLINT_LOG");
119-
let mut args: Vec<_> = std::env::args().collect();
120-
121-
if !args.iter().any(|x| x == "--sysroot") {
122-
args.push("--sysroot".to_owned());
123-
args.push(probe_sysroot());
124-
}
107+
let args: Vec<_> = std::env::args().collect();
125108

126109
match rustc_driver::RunCompiler::new(&args, &mut MyCallbacks).run() {
127110
Ok(_) => ExitCode::SUCCESS,

0 commit comments

Comments
 (0)