File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,28 @@ rustc -Clinker-plugin-lto="/path/to/LLVMgold.so" -L. -Copt-level=2 ./main.rs
8989
9090## Toolchain Compatibility
9191
92+ <!-- NOTE: to update the below table, you can use this shell script:
93+
94+ ```sh
95+ rustup toolchain install --profile minimal nightly
96+ MINOR_VERSION=$(rustc +nightly --version | cut -d . -f 2)
97+ LOWER_BOUND=44
98+
99+ llvm_version() {
100+ toolchain="$1"
101+ printf "Rust $toolchain | Clang "
102+ rustc +"$toolchain" -Vv | grep LLVM | cut -d ':' -f 2 | tr -d ' '
103+ }
104+
105+ for version in `seq $LOWER_BOUND $((MINOR_VERSION - 2))`; do
106+ toolchain=1.$version.0
107+ rustup toolchain install --no-self-update --profile minimal $toolchain >/dev/null 2>&1
108+ llvm_version $toolchain
109+ done
110+ ```
111+
112+ -->
113+
92114In order for this kind of LTO to work, the LLVM linker plugin must be able to
93115handle the LLVM bitcode produced by both ` rustc ` and ` clang ` .
94116
You can’t perform that action at this time.
0 commit comments