about summary refs log tree commit diff
path: root/src/doc/rustc
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-09-07 22:06:23 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-09-07 22:06:23 -0400
commit0c9bf13f5f11047bb03313624f0430d93d4e840d (patch)
treeab4466c86e48b0f01da06cd002a12b3df5480452 /src/doc/rustc
parent7d289aeade481c03d42e7f6d31bc6b64a73cfa45 (diff)
downloadrust-0c9bf13f5f11047bb03313624f0430d93d4e840d.tar.gz
rust-0c9bf13f5f11047bb03313624f0430d93d4e840d.zip
Add a script to automatically update Rust/Clang versions
Diffstat (limited to 'src/doc/rustc')
-rw-r--r--src/doc/rustc/src/linker-plugin-lto.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/doc/rustc/src/linker-plugin-lto.md b/src/doc/rustc/src/linker-plugin-lto.md
index c0b14352b7d..7ddd5ae5275 100644
--- a/src/doc/rustc/src/linker-plugin-lto.md
+++ b/src/doc/rustc/src/linker-plugin-lto.md
@@ -89,6 +89,28 @@ rustc -Clinker-plugin-lto="/path/to/LLVMgold.so" -L. -Copt-level=2 ./main.rs
 
 ## Toolchain Compatibility
 
+<!-- NOTE: to update the below table, you can use this shell script:
+
+```sh
+rustup toolchain install --profile minimal nightly
+MINOR_VERSION=$(rustc +nightly --version | cut -d . -f 2)
+LOWER_BOUND=44
+
+llvm_version() {
+    toolchain="$1"
+    printf "Rust $toolchain    |    Clang "
+    rustc +"$toolchain" -Vv | grep LLVM | cut -d ':' -f 2 | tr -d ' '
+}
+
+for version in `seq $LOWER_BOUND $((MINOR_VERSION - 2))`; do
+    toolchain=1.$version.0
+    rustup toolchain install --no-self-update --profile  minimal $toolchain >/dev/null 2>&1
+    llvm_version $toolchain
+done
+```
+
+-->
+
 In order for this kind of LTO to work, the LLVM linker plugin must be able to
 handle the LLVM bitcode produced by both `rustc` and `clang`.