about summary refs log tree commit diff
path: root/src/doc/rustc
AgeCommit message (Collapse)AuthorLines
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
2020-01-13rustc: add lint level cli ordering into the documentationTobias Thiel-0/+20
2019-12-01rustc_lint: Remove lint `plugin_as_library`Vadim Petrochenkov-12/+0
2019-11-23docs: fix lint name for `unused_variables`Ivan Kozik-1/+1
2019-11-08Rollup merge of #65785 - Centril:compat-to-error-2, r=oli-obkMazdak Farrokhzad-104/+27
Transition future compat lints to {ERROR, DENY} - Take 2 Follow up to https://github.com/rust-lang/rust/pull/63247 implementing https://github.com/rust-lang/rust/pull/63247#issuecomment-536295992. - `legacy_ctor_visibility` (ERROR) -- closes #39207 - `legacy_directory_ownership` (ERROR) -- closes #37872 - `safe_extern_static` (ERROR) -- closes #36247 - `parenthesized_params_in_types_and_modules` (ERROR) -- closes #42238 - `duplicate_macro_exports` (ERROR) - `nested_impl_trait` (ERROR) -- closes #59014 - `ill_formed_attribute_input` (DENY) -- transitions #57571 - `patterns_in_fns_without_body` (DENY) -- transitions #35203 r? @varkor cc @petrochenkov
2019-11-07Remove docs on --extern metadata precedence.Eric Huss-3/+2
2019-11-07Update extern linking documentation.Eric Huss-7/+27
2019-11-07Stabilize --extern flag without a path.Eric Huss-1/+6
2019-11-06patterns_in_fns_without_body -> denyMazdak Farrokhzad-40/+40
2019-11-06parenthesized_params_in_types_and_modules -> errorMazdak Farrokhzad-25/+0
2019-11-06safe_extern_static -> errorMazdak Farrokhzad-5/+0
2019-11-06legacy_directory_ownership -> errorMazdak Farrokhzad-12/+0
2019-11-06legacy_ctor_visibility -> errorMazdak Farrokhzad-35/+0
2019-11-03Attempt to clarify LTO and codegen-units.Eric Huss-10/+21
2019-10-26Be more specific with -C inline-threshold.Eric Huss-6/+14
2019-10-26Apply suggestions from kinnisonEric Huss-5/+5
Co-Authored-By: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-10-26Update codegen option documentation.Eric Huss-68/+235
2019-10-22Target-feature documented as unsafe. rustc book and rustc -C help have been ↵togiberlin-1/+23
modified.
2019-10-21Rollup merge of #62330 - SimonSapin:no-drop-in-union-fields, r=RalfJungMazdak Farrokhzad-24/+0
Change untagged_unions to not allow union fields with drop This is a rebase of #56440, massaged to solve merge conflicts and make the test suite pass. Change untagged_unions to not allow union fields with drop Union fields may now never have a type with attached destructor. This for example allows unions to use arbitrary field types only by wrapping them in `ManuallyDrop` (or similar). The stable rule remains, that union fields must be `Copy`. We use the new rule for the `untagged_union` feature. Tracking issue: https://github.com/rust-lang/rust/issues/55149
2019-10-18Auto merge of #64925 - ehuss:document-json, r=Mark-Simulacrumbors-1/+240
Document JSON message output. This documents the JSON messages in the rustc book.
2019-10-14Add troubleshooting section to PGO chapter in rustc book.Michael Woerister-0/+11
2019-10-13Rollup merge of #65039 - HeroicKatora:deny-by-default-book, r=GuillaumeGomezMazdak Farrokhzad-0/+25
Document missing deny by default lints