summary refs log tree commit diff
path: root/src/doc/rustc
AgeCommit message (Collapse)AuthorLines
2020-09-25Remove note about missing ios/tvos targets in platform docs.Eric Huss-9/+8
I misunderstood how this works, and I have fixed the linux builds to support ios/tvos.
2020-09-16Auto merge of #76420 - Gelbpunkt:aarch64-linux-musl, r=pietroalbinibors-1/+1
Add aarch64-unknown-linux-musl host builds This adds aarch64-unknown-linux-musl to the hosts list and adds the build to the dist-arm-linux builder as `@Mark-Simulacrum` suggested to me in Zulip. `@jyn514` requested to be mentioned :smile: I had to update the config for crosstool-ng as it had a prompt about the glibc version. I ran `src/ci/docker/run.sh dist-arm-linux` to test it. ``` Build completed successfully in 1:31:50 Compile requests 8180 Compile requests executed 8135 Cache hits 287 Cache misses 7848 Cache timeouts 0 Cache read errors 0 Forced recaches 0 Cache write errors 0 Compilation failures 0 Cache errors 0 Non-cacheable compilations 0 Non-cacheable calls 36 Non-compilation calls 9 Unsupported compiler calls 0 Average cache write 0.000 s Average cache read miss 6.389 s Average cache read hit 0.000 s Cache location Local disk: "/sccache" Cache size 202 MiB Max cache size 10 GiB == clock drift check == local time: Sun Sep 6 19:30:17 UTC 2020 network time: Sun, 06 Sep 2020 19:30:17 GMT == end clock drift check == ``` Only errors were in miri due to struct fields being private (already been reported [here](https://github.com/rust-lang/rust/issues/76337)) Edit: Maybe it is helpful if I add that it is a working compiler ```sh /rust-nightly-aarch64-unknown-linux-musl # ash install.sh install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh install: installing component 'rustc' install: installing component 'cargo' install: installing component 'rls-preview' install: installing component 'rust-analyzer-preview' install: installing component 'clippy-preview' install: installing component 'rustfmt-preview' install: installing component 'llvm-tools-preview' install: installing component 'rust-analysis-aarch64-unknown-linux-musl' install: installing component 'rust-std-aarch64-unknown-linux-musl' install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error Rust is ready to roll. / # cat test.rs fn main() { println!("hello world"); } / # rustc test.rs / # ./test hello world # file test test: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped ```
2020-09-15doc: platform-support.md: Move to tier 3Alistair Francis-1/+1
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-15doc: platform-support.md: Document portAlistair Francis-0/+1
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2020-09-14Update based on @alex's PRJens Reidel-1/+1
2020-09-13Auto-generate lint documentation.Eric Huss-1562/+36
2020-09-09Reword `trivial_casts` lint to better explain.Andrew Lilley Brinker-1/+2
The current description of the trivial casts lint under the "allowed by default" listing in the rustc book indicates the lint is for lints which may be removed, which is less clear than saying it's for lints which may be replaced by coercion (which is the wording used by the error message included in the doc). This commit changes the wording slightly to better describe what the lint does.
2020-09-09Rollup merge of #76465 - jyn514:auto-versioning, r=elichaiTyler Mandry-0/+22
Add a script to automatically update Rust/Clang versions in documentation From https://github.com/rust-lang/rust/pull/76402#issuecomment-687974508. r? @elichai
2020-09-07Add a script to automatically update Rust/Clang versionsJoshua Nelson-0/+22
2020-09-06linker-plugin-lto.md: Convert the rust-clang MxN table to a 2xM tableElichai Turkel-15/+15
2020-09-06Update linker-plugin-lto.md to contain up to rust 1.46Elichai Turkel-12/+15
2020-08-31Stabilise link-self-contained optionMateusz Mikuła-4/+16
2020-08-30Auto merge of #75919 - rust-lang:jonas-schievink-patch-1, r=ehussbors-1/+1
Fix typo (`thumbv8m.main-none-eabihf` is Mainline)
2020-08-25Fix typo (`thumbv8m.main-none-eabihf` is Mainline)Jonas Schievink-1/+1
2020-08-24[AVR] Replace 'avr-unknown-unknown' with 'avr-unknown-gnu-atmega328' in ↵Dylan McKay-1/+1
platform-support.md
2020-08-18Remove missing_fragment_specifier lintAleksey Kladov-9/+0
2020-08-17Mark x86_64-linux-kernel as *Sasha-1/+1
2020-08-14Move CloudABI to tier 3.Eric Huss-1/+1
2020-08-12Add a script to verify the Platform Support page is up-to-date.Eric Huss-8/+9
2020-08-11Platform Support page updates.Eric Huss-193/+198
A few updates: - Some minor wording and formatting changes. - Remove the `cargo` column. - Explain the columns up-front. - Add no-wrap on the target-triple, which looks better to me. - Minor mention on how to install support for a built-in target via rustup.
2020-08-11Move forge platform-support to the rustc book.Eric Huss-0/+223
2020-07-25Fix rustc docs typo.16yuki0702-1/+1
2020-07-14Stabilize control-flow-guard codegen optionAndrew Paverd-0/+12
2020-06-20Clarify --extern documentation.Adrian Taylor-2/+10
Fixes #64731, #73531. See also #64402#issuecomment-530852886
2020-05-20llvm: Expose tiny code model to usersVadim Petrochenkov-1/+1
2020-05-18Rollup merge of #72290 - elichai:2020-doc-lto, r=wesleywiserDylan DPC-6/+12
Add newer rust versions to linker-plugin-lto.md Hi, This doc got a bit out of date, it's hosted here: https://doc.rust-lang.org/rustc/linker-plugin-lto.html you can check the versions I've added via: ```bash $ rustup install 1.38.0 $ rustc +1.38.0 -vV rustc 1.38.0 (625451e37 2019-09-23) binary: rustc commit-hash: 625451e376bb2e5283fc4741caa0a3e8a2ca4d54 commit-date: 2019-09-23 host: x86_64-unknown-linux-gnu release: 1.38.0 LLVM version: 9.0 $ rustup install 1.43.1 $ rustc +1.43.1 -vV rustc 1.43.1 (8d69840ab 2020-05-04) binary: rustc commit-hash: 8d69840ab92ea7f4d323420088dd8c9775f180cd commit-date: 2020-05-04 host: x86_64-unknown-linux-gnu release: 1.43.1 LLVM version: 9.0 ```
2020-05-17Auto merge of #72248 - petrochenkov:codemodel, r=Amanieubors-2/+18
Cleanup and document `-C code-model` r? @Amanieu
2020-05-17Update linker-plugin-lto.md to contain up to rust 1.43Elichai Turkel-6/+12
2020-05-16rustc-book: Document `-C code-model`Vadim Petrochenkov-2/+18
2020-05-11cmdline: Make target features individually overridableVadim Petrochenkov-1/+9
2020-05-05Rollup merge of #71897 - alexcrichton:embed-bitcode-docs, r=nnethercoteDylan DPC-8/+36
Improve docs for embed-bitcode and linker-plugin-lto Follow-up from #71716 I wasn't able to add in time.
2020-05-04Improve docs for embed-bitcode and linker-plugin-ltoAlex Crichton-8/+36
Follow-up from #71716 I wasn't able to add in time.
2020-05-04Add Option to Force Unwind TablesSam Elliott-0/+12
When panic != unwind, `nounwind` is added to all functions for a target. This can cause issues when a panic happens with RUST_BACKTRACE=1, as there needs to be a way to reconstruct the backtrace. There are three possible sources of this information: forcing frame pointers (for which an option exists already), debug info (for which an option exists), or unwind tables. Especially for embedded devices, forcing frame pointers can have code size overheads (RISC-V sees ~10% overheads, ARM sees ~2-3% overheads). In code, it can be the case that debug info is not kept, so it is useful to provide this third option, unwind tables, that users can use to reconstruct the call stack. Reconstructing this stack is harder than with frame pointers, but it is still possible. This commit adds a compiler option which allows a user to force the addition of unwind tables. Unwind tables cannot be disabled on targets that require them for correctness, or when using `-C panic=unwind`.
2020-05-01Rename `bitcode-in-rlib` option to `embed-bitcode`Alex Crichton-33/+27
This commit finishes work first pioneered in #70458 and started in #71528. The `-C bitcode-in-rlib` option, which has not yet reached stable, is renamed to `-C embed-bitcode` since that more accurately reflects what it does now anyway. Various tests and such are updated along the way as well. This'll also need to be backported to the beta channel to ensure we don't accidentally stabilize `-Cbitcode-in-rlib` as well.
2020-04-29Auto merge of #71528 - alexcrichton:no-more-bitcode, r=nnethercotebors-20/+26
Store LLVM bitcode in object files, not compressed This commit is an attempted resurrection of #70458 where LLVM bitcode emitted by rustc into rlibs is stored into object file sections rather than in a separate file. The main rationale for doing this is that when rustc emits bitcode it will no longer use a custom compression scheme which makes it both easier to interoperate with existing tools and also cuts down on compile time since this compression isn't happening. The blocker for this in #70458 turned out to be that native linkers didn't handle the new sections well, causing the sections to either trigger bugs in the linker or actually end up in the final linked artifact. This commit attempts to address these issues by ensuring that native linkers ignore the new sections by inserting custom flags with module-level inline assembly. Note that this does not currently change the API of the compiler at all. The pre-existing `-C bitcode-in-rlib` flag is co-opted to indicate whether the bitcode should be present in the object file or not. Finally, note that an important consequence of this commit, which is also one of its primary purposes, is to enable rustc's `-Clto` bitcode loading to load rlibs produced with `-Clinker-plugin-lto`. The goal here is that when you're building with LTO Cargo will tell rustc to skip codegen of all intermediate crates and only generate LLVM IR. Today rustc will generate both object code and LLVM IR, but the object code is later simply thrown away, wastefully.
2020-04-29Store LLVM bitcode in object files, not compressedAlex Crichton-20/+26
This commit is an attempted resurrection of #70458 where LLVM bitcode emitted by rustc into rlibs is stored into object file sections rather than in a separate file. The main rationale for doing this is that when rustc emits bitcode it will no longer use a custom compression scheme which makes it both easier to interoperate with existing tools and also cuts down on compile time since this compression isn't happening. The blocker for this in #70458 turned out to be that native linkers didn't handle the new sections well, causing the sections to either trigger bugs in the linker or actually end up in the final linked artifact. This commit attempts to address these issues by ensuring that native linkers ignore the new sections by inserting custom flags with module-level inline assembly. Note that this does not currently change the API of the compiler at all. The pre-existing `-C bitcode-in-rlib` flag is co-opted to indicate whether the bitcode should be present in the object file or not. Finally, note that an important consequence of this commit, which is also one of its primary purposes, is to enable rustc's `-Clto` bitcode loading to load rlibs produced with `-Clinker-plugin-lto`. The goal here is that when you're building with LTO Cargo will tell rustc to skip codegen of all intermediate crates and only generate LLVM IR. Today rustc will generate both object code and LLVM IR, but the object code is later simply thrown away, wastefully.
2020-04-26rustc-book: Document `-C relocation-model`Vadim Petrochenkov-4/+39
2020-04-22Alphabetize the `-C` and `-Z` options.Nicholas Nethercote-215/+215
In the code, test, and docs, because it makes it much easier to find things. Other than adding the comments about alphabetical order, this commit only moves things around.
2020-04-22Add a new option `-Cbitcode-in-rlib`.Nicholas Nethercote-0/+20
It defaults to true, but Cargo will set this to false whenever it can to reduce compile times.
2020-04-19Disallow values for `-C no-*` and `-Z no-*` options again.Nicholas Nethercote-17/+6
With the exception of `-C no-redzone`, because that could take a value before this PR. This partially undoes one of the earlier commits in this PR, which added the ability to take a value to all boolean options that lacked it. The help output for these options looks like this: ``` -C no-vectorize-slp=val -- disable LLVM's SLP vectorization pass ``` The "=val" part is a lie, but hopefully this will be fixed in the future.
2020-04-19Improve codegen option docs.Nicholas Nethercote-84/+101
This commit: - Adds "following values" indicators for all the options that are missing them. - Tweaks some wording and punctuation for consistency. - Rewords some things for clarity. - Removes the `no-integrated-as` entry, because that option was removed in #70345.
2020-04-09Fix JSON file_name documentation for macros.Eric Huss-2/+5
2020-04-07rustc_session: forbid lints override regardless of positionTobias Thiel-1/+1
2020-04-01Update -Ccodegen-units docs wrt incr. comp. in rustc book.Michael Woerister-3/+2
2020-03-23Reword unused variable warningAlex Tokarev-2/+2
2020-03-12Rollup merge of #69747 - spastorino:rename-rustc-guide, r=pietroalbiniMazdak Farrokhzad-2/+2
Rename rustc guide This is in preparation for https://github.com/rust-lang/rustc-guide/issues/470 Needs to be merged after we actually rename the guide. Have used this to rename: `git grep -l 'rustc_guide' | xargs sed -i 's/rustc_guide/rustc_dev_guide/g'` `git grep -l 'rustc-guide' | xargs sed -i 's/rustc-guide/rustc-dev-guide/g'` `git grep -l 'rustc guide' | xargs sed -i 's/rustc guide/rustc dev guide/g'`
2020-03-10rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.orgSantiago Pastorino-1/+1
2020-03-10Rename rustc_guide to rustc_dev_guideSantiago Pastorino-2/+2
2020-03-10Rename rustc-guide to rustc-dev-guideSantiago Pastorino-1/+1
2020-03-07Add new option to the documentation.O01eg-0/+1