#component #llvm #rustup #installed #path #llvm-tools-preview

llvm-tools

Provides access to the llvm tools installed through the llvm-tools-preview rustup component

2 releases

0.1.1 Mar 23, 2019
0.1.0 Mar 23, 2019

#1240 in Development tools

Download history 2974/week @ 2024-07-20 2921/week @ 2024-07-27 2441/week @ 2024-08-03 3056/week @ 2024-08-10 2686/week @ 2024-08-17 3626/week @ 2024-08-24 2494/week @ 2024-08-31 2534/week @ 2024-09-07 2895/week @ 2024-09-14 2364/week @ 2024-09-21 2801/week @ 2024-09-28 2882/week @ 2024-10-05 2358/week @ 2024-10-12 2814/week @ 2024-10-19 2518/week @ 2024-10-26 2745/week @ 2024-11-02

10,905 downloads per month
Used in 14 crates (6 directly)

MIT/Apache

7KB
58 lines

llvm-tools

Provides access to the llvm tools installed through the llvm-tools-preview rustup component.

Usage

Add the dependency in your Cargo.toml:

[dependencies]
llvm-tools = "0.1"

Get the path to the llvm-objcopy that is shipped with Rust:

let llvm_tools = llvm_tools::LlvmTools::new().expect("failed to find llvm-tools");
let objcopy = llvm_tools.tool(&llvm_tools::exe("llvm-objcopy"))
    .expect("llvm-objcopy not found in llvm-tools");
let mut cmd = Command::new(objcopy);
cmd.arg("");
[]

Note this only works if the user has the llvm-tools-preview rustup component installed. Else Error::NotFound is returned.

License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps