diff options
| author | bors <bors@rust-lang.org> | 2020-09-09 22:17:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-09 22:17:42 +0000 |
| commit | 97eb606e4b2becd17d46a67d87169f52b210e67c (patch) | |
| tree | 7a8f83e2ca64a5f2225f4476ef4a61de8e4e8a2d /src/doc | |
| parent | e2be5f568d1f60365b825530f5b5cb722460591b (diff) | |
| parent | 32714eb6bc3cbfe48774e85472ad8431fba3c7c8 (diff) | |
| download | rust-97eb606e4b2becd17d46a67d87169f52b210e67c.tar.gz rust-97eb606e4b2becd17d46a67d87169f52b210e67c.zip | |
Auto merge of #76540 - tmandry:rollup-5ogt8x0, r=tmandry
Rollup of 14 pull requests Successful merges: - #75094 (Add `-Z combine_cgu` flag) - #75984 (Improve unresolved use error message) - #76141 (Address review comments about config.toml from rustc-dev-guide PR) - #76313 (Improved the MIR spanview output) - #76430 (Add align to rustc-attrs unstable book) - #76465 (Add a script to automatically update Rust/Clang versions in documentation) - #76473 (Add missed spaces to GCC-WARNING.txt) - #76481 (Convert repetitive target_pointer_width checks to const solution.) - #76493 (Remove a stray ignore-tidy-undocumented-unsafe) - #76504 (Capitalize safety comments) - #76515 (SessionDiagnostic: Fix non-determinism in generated format string.) - #76516 (Enable GitHub Releases synchronization) - #76522 (remove redundant clones) - #76523 (Remove unused PlaceContext::NonUse(NonUseContext::Coverage)) Failed merges: r? `@ghost`
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/rustc/src/linker-plugin-lto.md | 22 | ||||
| -rw-r--r-- | src/doc/unstable-book/src/language-features/rustc-attrs.md | 4 |
2 files changed, 24 insertions, 2 deletions
diff --git a/src/doc/rustc/src/linker-plugin-lto.md b/src/doc/rustc/src/linker-plugin-lto.md index f7843abf4d6..18f1be6a1fa 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`. diff --git a/src/doc/unstable-book/src/language-features/rustc-attrs.md b/src/doc/unstable-book/src/language-features/rustc-attrs.md index 2967200faf8..1d9409ee9e4 100644 --- a/src/doc/unstable-book/src/language-features/rustc-attrs.md +++ b/src/doc/unstable-book/src/language-features/rustc-attrs.md @@ -13,8 +13,8 @@ The `rustc_attrs` feature allows debugging rustc type layouts by using with `cargo check`) as an alternative to `rustc -Z print-type-sizes` that is way more verbose. -Options provided by `#[rustc_layout(...)]` are `debug`, `size`, `abi`. -Note that it only work best with sized type without generics. +Options provided by `#[rustc_layout(...)]` are `debug`, `size`, `align`, +`abi`. Note that it only works on sized types without generics. ## Examples |
