diff options
| author | Jorge Aparicio <jorge@japaric.io> | 2018-05-30 08:01:35 +0200 |
|---|---|---|
| committer | Jorge Aparicio <jorge@japaric.io> | 2018-06-03 18:23:01 +0200 |
| commit | 66a7db9a3593b1bc4744239a21520369f0418d3c (patch) | |
| tree | 362dc1094b491474856afaeee00a962a97869315 /src/bootstrap/lib.rs | |
| parent | 8e673073f349f9b7cadaf809f8b88a2bfd296769 (diff) | |
| download | rust-66a7db9a3593b1bc4744239a21520369f0418d3c.tar.gz rust-66a7db9a3593b1bc4744239a21520369f0418d3c.zip | |
make a llvm-tools rustup component
Diffstat (limited to 'src/bootstrap/lib.rs')
| -rw-r--r-- | src/bootstrap/lib.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index dec514a0da6..cb135ad6f35 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -957,6 +957,24 @@ impl Build { self.package_vers(&self.release_num("rustfmt")) } + 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"), + ); + + 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`"); + } + /// Returns the `version` string associated with this compiler for Rust /// itself. /// |
