use rustc version as llvm-tools version

This commit is contained in:
Jorge Aparicio 2018-06-03 13:56:58 +02:00
parent 66a7db9a35
commit a2c2ed3c0c

View file

@ -958,21 +958,24 @@ impl Build {
}
fn llvm_tools_vers(&self) -> String {
let stdout = build_helper::output(
Command::new(self.llvm_out(self.config.build).join("build/bin/llvm-size"))
.arg("--version"),
);
// XXX should we use LLVM version here?
// let stdout = build_helper::output(
// Command::new(self.llvm_out(self.config.build).join("build/bin/llvm-size"))
// .arg("--version"),
// );
for line in stdout.lines() {
if line.contains("LLVM version") {
if let Some(vers) = line.split_whitespace().nth(2) {
return vers.to_string();
}
}
}
// for line in stdout.lines() {
// if line.contains("LLVM version") {
// if let Some(vers) = line.split_whitespace().nth(2) {
// return vers.to_string();
// }
// }
// }
panic!("The output of $LLVM_TOOL has changed; \
please fix `bootstrap::Build.llvm_tools_vers`");
// panic!("The output of $LLVM_TOOL has changed; \
// please fix `bootstrap::Build.llvm_tools_vers`");
self.rust_version()
}
/// Returns the `version` string associated with this compiler for Rust