Open briansmith opened 10 months ago
I believe the reason it is in the target-specific directory is to avoid conflicts with a system install of the respective tools. With rustup the rust version would take precedence if in the target-agnostic directory, while for a system installation it would overwrite the system installation which will cause the change to be reverted again on the next update of LLVM by the distro. Note that we actually always install them in the directory with a name matching the host architecture on which the tools can actually run. So for an x86_64-unknown-linux-gnu toolchain you will always find them in $SYSROOT/lib/rustlib/x86_64-unknown-linux-gnu/bin
even if you are cross-compiling to for example aarch64-apple-darwin.
On an x86-64 Linux system, I ran:
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:
Thus, it seems to me that the tools should be per-host, not per-target.