llvm-tools/llvm-tools-preview is installed in a target-specific directory instead of target-agnostic directory
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
On an x86-64 Linux system, I ran:
$ rustup toolchain install --component=llvm-tools-preview stable
$ find ~/.rustup -name "llvm-nm"
/home/whatever/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-nm
The problem: The LLVM tools are installed at in the target-specific directory library directory "lib/rustlib/x86_64-unknown-linux-gnu/" under the toolchain directory ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu. Instead they should be installed directly in the toolchain directory, so that the result above would be ~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/llvm-nm.
When originally announced at https://internals.rust-lang.org/t/llvm-tools-a-new-rustup-component-for-binary-inspection-objdump-nm-size-and-profiling-profdata/7830, it was said that:
The main advantage of these LLVM tools is that they support all the architectures that the Rust compiler supports. For example, llvm-objdump con disassemble object files containing machine code for architectures ranging from ARM Cortex-M (THUMB) all the way to WASM (*) and x86_64. OTOH, if you were to use the GNU tools you would have to install one set of binutils for each architecture you are working with (e.g. avr-binutils, arm-none-eabi-binutils, msp430-elf-binutils, etc.).
Thus, it seems to me that the tools should be per-host, not per-target.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the rustup toolchain installation of the llvm-tools-preview component and compare the observed target-specific path with the requested toolchain-level bin path. Verify the behavior with the commands in the issue and confirm that llvm-nm and the other LLVM tools are installed per host rather than per target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100