Skip to content

Commit

Permalink
Rollup merge of rust-lang#59351 - phil-opp:llvm-ar, r=alexcrichton
Browse files Browse the repository at this point in the history
Include llvm-ar with llvm-tools component

Adds the `llvm-ar` tool to the `llvm-tools` component. This is useful for [building and linking native code](https://doc.rust-lang.org/cargo/reference/build-scripts.html#case-study-building-some-native-code) in cargo build scripts without needing to use the platform specific `ar`. According to rust-lang#58663 it is also useful for WASM.

 `llvm-ar` is very small (~82KB), so it does not significantly increase the size of the `llvm-tools` component.

Fixes rust-lang#58663
  • Loading branch information
Centril authored Mar 28, 2019
2 parents dcd531e + 45e9acc commit e04b7b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ const LLVM_TOOLS: &[&str] = &[
"llvm-readobj", // used to get information from ELFs/objects that the other tools don't provide
"llvm-size", // used to prints the size of the linker sections of a program
"llvm-strip", // used to discard symbols from binary files to reduce their size
"llvm-ar" // used for creating and modifying archive files
];

/// A structure representing a Rust compiler.
Expand Down

0 comments on commit e04b7b8

Please sign in to comment.