about summary refs log tree commit diff
path: root/src/librustc_session/config.rs
AgeCommit message (Collapse)AuthorLines
2020-05-01Rename `bitcode-in-rlib` option to `embed-bitcode`Alex Crichton-2/+2
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-26rustc_target: Stop using "string typing" for TLS modelsVadim Petrochenkov-5/+3
Introduce `enum TlsModel` instead.
2020-04-26rustc_target: Stop using "string typing" for relocation modelsVadim Petrochenkov-5/+2
Introduce `enum RelocModel` instead.
2020-04-22Add a new option `-Cbitcode-in-rlib`.Nicholas Nethercote-0/+10
It defaults to true, but Cargo will set this to false whenever it can to reduce compile times.
2020-04-20Auto merge of #70729 - nnethercote:a-big-options-clean-up, r=petrochenkovbors-22/+17
A big options clean-up Lots of improvements here. r? @Centril
2020-04-19Dogfood more or_patterns in the compilerJosh Stone-4/+2
2020-04-19Replace uses of `parse_opt_*` with `parse_*` where possible.Nicholas Nethercote-22/+17
This lets us specify the default at the options declaration point, instead of using `.unwrap(default)` or `None | Some(default)` at some use point far away. It also makes the code more concise.
2020-04-17Make -Zprofile set codegen-units to 1Amanieu d'Antras-1/+11
2020-04-09mark a temporary hack as suchRalf Jung-1/+3
2020-04-07rustc_session: forbid lints override regardless of positionTobias Thiel-1/+7
2020-04-02Add hash of source files in debug infoArlo Siemsen-11/+19
* Adds either an MD5 or SHA1 hash to the debug info. * Adds new unstable option `-Z src-hash-algorithm` to control the hashing algorithm.
2020-03-31more clippy fixesMatthias Krüger-1/+1
use is_empty() instead of len comparison (clippy::len_zero) use if let instead of while let loop that never loops (clippy::never_loop) remove redundant returns (clippy::needless_return) remove redundant closures (clippy::redundant_closure) use if let instead of match and wildcard pattern (clippy::single_match) don't repeat field names redundantly (clippy::redundant_field_names)
2020-03-24Remove `-Z incremental`.Nicholas Nethercote-28/+1
`-C incremental` was introduced over two years ago. `-Z incremental` was kept for transitioning, but it's been long enough now that it should be ok to remove it.
2020-03-22remove redundant closures (clippy::redundant_closure)Matthias Krüger-1/+1
2020-03-20remove redundant returns (clippy::needless_return)Matthias Krüger-1/+1
2020-03-01Print new --print option in help.O01eg-1/+1
2020-03-01Expose target libdir information via print command.O01eg-0/+2
With custom libdir it is required to have an access to library placement.
2020-02-29Rollup merge of #69551 - matthiaskrgr:len_zero, r=Mark-SimulacrumDylan DPC-1/+1
use is_empty() instead of len() == x to determine if structs are empty.
2020-02-28use is_empty() instead of len() == x to determine if structs are empty.Matthias Krüger-1/+1
2020-02-27Remove unneeded calls to format!()Björn Steinbrink-4/+2
2020-02-16Auto merge of #67885 - tobithiel:fix_group_lint_allow_override, ↵bors-3/+10
r=Mark-Simulacrum rustc_session: allow overriding lint level of individual lints from a group Fixes #58211 and fixes rust-lang/rust-clippy#4778 and fixes rust-lang/rust-clippy#4091 Instead of hard-coding the lint level preferences (from lowest to highest precedence: `lint::Allow -> lint::Warn -> lint::Deny -> lint::Forbid`), the position of the argument in the command line gets taken into account. Examples: 1. Passing `-D unused -A unused-variables` denies everything in the lint group `unused` **except** `unused-variables` which is explicitly allowed. 1. Passing `-A unused-variables -D unused` denies everything in the lint group `unused` **including** `unused-variables` since the allow is specified before the deny (and therefore overridden by the deny). This matches the behavior that is already being used when specifying `allow`/`deny` in the source code.
2020-02-12Rollup merge of #68487 - 0dvictor:nolink, r=tmandryYuki Okushi-0/+1
[experiment] Support linking from a .rlink file Flag `-Z no-link` was previously introduced, which allows creating an `.rlink` file to perform compilation without linking. This change enables linking from an `.rlink` file. Part of Issue #64191
2020-02-11Support linking from a .rlink fileVictor Ding-0/+1
Flag `-Z no-link` was previously introduced, which allows creating an `.rlink` file to perform compilation without linking. This change enables linking from an `.rlink` file.
2020-02-06rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.Eduard-Mihai Burtescu-1/+1
2020-02-04remove redundant imports (clippy::single_component_path_imports)Matthias Krüger-4/+0
2020-01-28Add support for Control Flow Guard on Windows.Andrew Paverd-2/+16
This patch enables rustc to emit the required LLVM module flags to enable Control Flow Guard metadata (cfguard=1) or metadata and checks (cfguard=2). The LLVM module flags are ignored on unsupported targets and operating systems.
2020-01-22Rollup merge of #68409 - sinkuu:temp_path, r=Mark-SimulacrumTyler Mandry-11/+20
Micro-optimize OutputFilenames For example, its methods consume 6% of time during debug-compiling a `warp` example: ![Screenshot (debug-compiling a `warp` example)](https://user-images.githubusercontent.com/7091080/72780288-d74f1580-3c61-11ea-953b-34e59ca682f9.png) This PR optimize them a bit by using `PathBuf::set_extension` instead of `Path::with_extension`, to avoid cloning `PathBuf` excessively.
2020-01-23Add `-Z no-link` flagVictor Ding-1/+1
Adds a compiler option to allow rustc compile a crate without linking. With this flag, rustc serializes codegen_results into a .rlink file.
2020-01-22Do not base path to append extensionMark Rousskov-4/+4
We already have ownership of the base path, so no need to clone it (within Path::with_extension).
2020-01-22Store filestem in a pre-formatted formMark Rousskov-11/+10
2020-01-22Privatize private fields of OutputFilenamesMark Rousskov-2/+12
2020-01-04rustc_session: allow overriding lint level of individual lints from a groupTobias Thiel-3/+10
2020-01-03rustdoc: Respect diagnostic debugging optionsVadim Petrochenkov-1/+12
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-4/+4
2019-12-30Support `-Z ui-testing=yes/no`Vadim Petrochenkov-0/+6
2019-12-22Format the worldMark Rousskov-206/+139
2019-12-20Move command line option definitions into a dedicated fileVictor Ding-936/+3
config.rs has reached the 3000 line tidy limit, this commit moves command line option definitions into a new file - options.rs, and leaves the rest of configuration infrastructure in config.rs.
2019-12-17Revert "Auto merge of #67362 - Mark-Simulacrum:par-4-default, r=alexcrichton"Mark Rousskov-5/+5
This reverts commit 3ed3b8bb7b100afecf7d5f52eafbb70fec27f537, reversing changes made to 99b89533d4cdf7682ea4054ad0ee36c351d05df1. We will reland a similar patch at a future date but for now we should get a nightly released in a few hours with the parallel patch, so this should be reverted to make sure that the next nightly is not parallel-enabled.
2019-12-16Change the default thread count to min(4, vCPUs)Mark Rousskov-5/+5
This avoids the problems of high thread counts (i.e., contention in the kernel on the jobserver pipe due to thundering herd of readers) while stil giving rustc some parallelism to work with.
2019-12-09Add options to --extern flag.Eric Huss-37/+132
2019-12-03Deduplicate CrateConfigMark Rousskov-3/+1
2019-12-03Move Session to librustc_sessionMark Rousskov-0/+2998