New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ship LLVM tools with the toolchain #50336
Changes from all commits
5e577b8
b5cdf9d
a1ef529
8e67307
66a7db9
a2c2ed3
7458af9
9a96876
File filter...
Jump to…
Diff settings
| @@ -199,6 +199,14 @@ use flags::Subcommand; | |||
| use cache::{Interned, INTERNER}; | |||
| use toolstate::ToolState; | |||
|
|
|||
| const LLVM_TOOLS: &[&str] = &[ | |||
| "llvm-nm", // used to inspect binaries; it shows symbol names, their sizes and visibility | |||
| "llvm-objcopy", // used to transform ELFs into binary format which flashing tools consume | |||
| "llvm-objdump", // used to disassemble programs | |||
| "llvm-profdata", // used to inspect and merge files generated by profiles | |||
| "llvm-size", // prints the size of the linker sections of a program | |||
| ]; | |||
|
|
|||
| /// A structure representing a Rust compiler. | |||
| /// | |||
| /// Each compiler has a `stage` that it is associated with and a `host` that | |||
| @@ -949,6 +957,27 @@ impl Build { | |||
| self.package_vers(&self.release_num("rustfmt")) | |||
| } | |||
|
|
|||
| fn llvm_tools_vers(&self) -> String { | |||
alexcrichton
Member
|
|||
| // japaric: 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(); | |||
| // } | |||
| // } | |||
| // } | |||
|
|
|||
| // 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 | |||
| /// itself. | |||
| /// | |||
any suggestion to get the LLVM version from source code rather than from a binary?