Description
Location
https://rustc-dev-guide.rust-lang.org/backend/debugging.html#filing-llvm-bug-reports
Quoting one of the bullets from the above link:
"
If you have compiled rustc yourself somewhere, in the target directory you have binaries for llc, opt, etc.
"
Summary
In one of my older compiler builds, back when there used to be config.example.toml (as opposed to the current bootstrap.example.toml), I could find all the llvm-* tools as shown below:
~/FOO_rustc_source/rust$ tree ../FOO_installed_1/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/bin/
../FOO_installed_1/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/bin/
├── gcc-ld
│ ├── ld64.lld
│ ├── ld.lld
│ ├── lld-link
│ └── wasm-ld
├── llc
├── llvm-ar
├── llvm-as
├── llvm-cov
├── llvm-dis
├── llvm-link
├── llvm-nm
├── llvm-objcopy
├── llvm-objdump
├── llvm-profdata
├── llvm-readobj
├── llvm-size
├── llvm-strip
├── opt
├── rust-lld
└── wasm-component-ld
The top-of-tree commit back then was:
commit 32b17d56eb02495f9865028e1f7271a3a48c0b9b (HEAD -> master, origin/master, origin/HEAD)
Merge: 66701c42263 675f447d886
Author: bors <bors@rust-lang.org>
Date: Mon Oct 28 10:44:24 2024 +0000
Auto merge of #132244 - jyn514:linker-refactors, r=bjorn3
fix various linker warnings
separated out from https://github.com/rust-lang/rust/pull/119286; this doesn't have anything user-facing, i just want to land these changes so i can stop rebasing them.
r? `@bjorn3`
However, now, I am on top of the following commit:
commit e9f8103f93f8ce2fa2c15c0c6796ec821f8ae15d (HEAD -> master, origin/master, origin/HEAD)
Merge: 3ef8e64ce9f ffa7d1ee5db
Author: bors <bors@rust-lang.org>
Date: Wed May 7 19:49:36 2025 +0000
Auto merge of #140590 - lcnr:closure-in-dead-code, r=compiler-errors
borrowck nested items in dead code
fixes https://github.com/rust-lang/rust/issues/140583
r? `@compiler-errors`
With this, I no longer see any of the llvm-* and llc binaries as shown below:
~/FOO_rustc_source_20250507/rust$ tree ../FOO_installed_23/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/bin/
../FOO_installed_23/usr/local/lib/rustlib/x86_64-unknown-linux-gnu/bin/
├── gcc-ld
│ ├── ld64.lld
│ ├── ld.lld
│ ├── lld-link
│ └── wasm-ld
├── rust-lld
└── rust-objcopy
1 directory, 6 files
I tried to modify bootstrap.example.toml and then cp bootstrap.example.toml bootstrap.toml
, before running ./x.py build && ./x.py install
as shown below, but to no avail:
~/FOO_rustc_source_20250507/rust$ git diff bootstrap.example.toml
diff --git a/bootstrap.example.toml b/bootstrap.example.toml
index 1371fd6442f..32a73b484c3 100644
--- a/bootstrap.example.toml
+++ b/bootstrap.example.toml
@@ -737,11 +740,12 @@
# Indicates whether some LLVM tools, like llvm-objdump, will be made available in the
# sysroot.
-#llvm-tools = true
+llvm-tools = true
# Indicates whether the `self-contained` llvm-bitcode-linker, will be made available
# in the sysroot. It is required for running nvptx tests.
#llvm-bitcode-linker = false
+llvm-bitcode-linker = true
# Whether to deny warnings in crates
#deny-warnings = true
What should I do to have these llvm-* binaries also get built as part of the compiler build process?