about summary refs log tree commit diff
path: root/compiler/rustc_session/src/options.rs
AgeCommit message (Collapse)AuthorLines
2023-11-07Add -Zcross-crate-inline-threshold=yesBen Kimock-1/+23
2023-11-02Rollup merge of #117509 - Zalathar:zsymbol, r=petrochenkovMatthias Krüger-3/+0
Remove support for alias `-Z symbol-mangling-version` (This is very similar to the removal of `-Z instrument-coverage` in #117111.) `-C symbol-mangling-version` was stabilized back in rustc 1.59.0 (2022-02-24) via #90128, with the old unstable flag kept around (with a warning) as an alias to ease migration.
2023-11-02use global cache when computing proof treeslcnr-2/+0
2023-11-02Remove support for alias `-Z symbol-mangling-version`Zalathar-3/+0
2023-10-28Rollup merge of #117311 - RalfJung:unpretty-thir-help, r=petrochenkovJubilee-0/+1
-Zunpretty help: add missing possible values `-Zunpretty` accepts "thir-tree" and "thir-flat", but that was not shown in `-Zhelp`.
2023-10-28-Zunpretty help: add missing possible valuesRalf Jung-0/+1
2023-10-28Rollup merge of #116534 - cjgillot:no-dep-tasks, r=davidtwcoJubilee-3/+0
Remove -Zdep-tasks. This option is not useful any more, we can use `tracing` and `RUSTC_LOG` to debug the dep-graph.
2023-10-26The value of `-Cinstrument-coverage=` doesn't need to be `Option`Zalathar-9/+9
Not using this flag is identical to passing `-Cinstrument-coverage=off`, so there's no need to distinguish between `None` and `Some(Off)`.
2023-10-25Remove support for alias `-Z instrument-coverage`Zalathar-10/+0
This flag was stabilized in rustc 1.60.0 as `-C instrument-coverage`, but the old unstable flag was kept around as an alias to ease migration.
2023-10-24Introduce `-C instrument-coverage=branch` to gate branch coverageArpad Borsos-1/+4
This flag has to be used in combination with `-Zunstable-options`, and is added in advance of adding branch coverage instrumentation.
2023-10-19Auto merge of #115214 - Urgau:rfc-3127-trim-paths, r=compiler-errorsbors-0/+27
Implement rustc part of RFC 3127 trim-paths This PR implements (or at least tries to) [RFC 3127 trim-paths](https://github.com/rust-lang/rust/issues/111540), the rustc part. That is `-Zremap-path-scope` with all of it's components/scopes. `@rustbot` label: +F-trim-paths
2023-10-17Automatically enable cross-crate inlining for small functionsBen Kimock-0/+2
2023-10-17[RFC 3127 - Trim Paths]: Add unstable option and parsingUrgau-0/+27
2023-10-14Add `Config::hash_untracked_state` callbackAlex Macleod-0/+5
2023-10-11Auto merge of #113218 - lqd:polonius-scopes, r=jackh726bors-1/+17
Compute NLL loan scopes using the polonius model For a *location-insensitive* analysis (that is, without expressiveness improvements for users yet), this PR implements loans going out of scope using reachability and liveness, rather than checking if the issuing region's values contain a given CFG point. This is equivalent to NLL scopes and computes the same data. r? `@matthewjasper` A couple of notes: - there are some assumptions about SCC representatives, placeholders, free regions, and member constraints that I believe hold, and they're documented in the code - this passes all the UI tests with `-Zpolonius=next` -- the perf is [not terrible](https://github.com/rust-lang/rust/pull/112432#issuecomment-1749685862) and there are a bunch of ways to improve it in the future. - there's a fixme left, hopefully Matthew you know a clean way to get the information it mentions.
2023-10-11Auto merge of #116014 - lqd:mcp510-2-electric-boogaloo, r=petrochenkovbors-1/+1
Implement `-Clink-self-contained=-linker` opt out This implements the `-Clink-self-contained` opt out necessary to switch to lld by changing rustc's defaults instead of cargo's. Components that are enabled and disabled on the CLI are recorded, for the purpose of being merged with the ones which the target spec will declare (I'll open another PR for that tomorrow, for easier review). For MCP510, we now check whether using the self-contained linker is disabled on the CLI. Right now it would only be sensible to with `-Zgcc-ld=lld` (and I'll add some checks that we don't both enable and disable a component on the CLI in a future PR), but the goal is to simplify adding the check of the target's enabled components here in the follow-up PRs. r? `@petrochenkov`
2023-10-10Rollup merge of #116595 - RalfJung:mir-enable-passes, r=oli-obkMatthias Krüger-3/+4
-Zmir-enable-passes: document that this may enable unsound passes also add some comments explaining why MIR opts are marked as unsound
2023-10-10-Zmir-enable-passes: document that this may enable unsound passesRalf Jung-3/+4
2023-10-08move single component parsing to dedicated functionRémy Rakic-1/+1
this will prevent parsing when expecting more than a single component to be parsed, and prepare for the symetric variant-to-name function to be added
2023-10-08Remove -Zdep-tasks.Camille GILLOT-3/+0
2023-10-08linker: Remove `-Zgcc-ld` optionVadim Petrochenkov-16/+0
It is subsumed by `-Clinker-flavor=*-lld-cc -Clink-self-contained=+linker` options now
2023-10-04introduce `Polonius` enum for `-Zpolonius`Rémy Rakic-1/+17
this allows to opt into using the legacy version or the in-tree prototype
2023-09-23Enable drop_tracking_mir by default.Camille GILLOT-6/+0
2023-09-22Allow `-Z treat-err-as-bug=0`Lieselotte-7/+14
Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
2023-09-20coverage: Remove debug code from the instrumentorZalathar-5/+2
2023-09-15implement -Z ignore-directory-in-diagnostics-source-blocksPietro Albini-0/+2
2023-09-13Auto merge of #115735 - bjorn3:better_list_crate_metadata, r=wesleywiserbors-2/+3
Extend rustc -Zls This makes it show a lot more things and thus a lot more useful.
2023-09-12Fix two typosbjorn3-1/+1
2023-09-11Auto merge of #115656 - cjgillot:default-relative-spans, r=davidtwcobors-3/+0
Enable incremental-relative-spans by default. This was enabled on nightly in https://github.com/rust-lang/rust/pull/84762. It has been a while, without obvious bugs. It's time to enable it by default for incremental runs.
2023-09-10Show lib features in -Zls and allow configuring which things are shownbjorn3-2/+3
2023-09-08sortAugie Fackler-2/+2
2023-09-08options: fix indentationAugie Fackler-3/+3
rustfmt didn't save me here, sigh
2023-09-08debuginfo: add compiler option to allow compressed debuginfo sectionsAugie Fackler-1/+18
LLVM already supports emitting compressed debuginfo. In debuginfo=full builds, the debug section is often a large amount of data, and it typically compresses very well (3x is not unreasonable.) We add a new knob to allow debuginfo to be compressed when the matching LLVM functionality is present. Like clang, if a known-but-disabled compression mechanism is requested, we disable compression and emit uncompressed debuginfo sections. The API is different enough on older LLVMs we just pretend the support is missing on LLVM older than 16.
2023-09-07Enable incremental-relative-spans by default.Camille GILLOT-3/+0
2023-08-18Add an (perma-)unstable option to disable vtable vptrGary Guo-0/+2
This flag is intended for evaluation of trait upcasting space cost for embedded use cases.
2023-07-31Fix a comment.Nicholas Nethercote-0/+1
Make it match the corresponding comment at the start of the unstable options.
2023-07-30inline format!() args up to and including rustc_middleMatthias Krüger-2/+1
2023-07-26Rollup merge of #114073 - ehuss:remove-z-diagnostic-width, r=fee1-deadMatthias Krüger-2/+0
Remove -Z diagnostic-width This removes the `-Z diagnostic-width` option since it is ignored and does nothing. `-Z diagnostic-width` was stabilized as `--diagnostic-width` in #95635. It is not entirely clear why the `-Z` flag was kept, but in part its final use was removed in #102216, but the `-Z` flag itself was not removed.
2023-07-26Auto merge of #113893 - mdibaiee:type-name-spill-flag, r=compiler-errorsbors-0/+2
new unstable option: -Zwrite-long-types-to-disk This option guards the logic of writing long type names in files and instead using short forms in error messages in rustc_middle/ty/error behind a flag. The main motivation for this change is to disable this behaviour when running ui tests. This logic can be triggered by running tests in a directory that has a long enough path, e.g. /my/very-long-path/where/rust-codebase/exists/ This means ui tests can fail depending on how long the path to their file is. Some ui tests actually rely on this behaviour for their assertions, so for those we enable the flag manually.
2023-07-25Remove -Z diagnostic-widthEric Huss-2/+0
2023-07-24new unstable option: -Zwrite-long-types-to-diskMahdi Dibaiee-0/+2
This option guards the logic of writing long type names in files and instead using short forms in error messages in rustc_middle/ty/error behind a flag. The main motivation for this change is to disable this behaviour when running ui tests. This logic can be triggered by running tests in a directory that has a long enough path, e.g. /my/very-long-path/where/rust-codebase/exists/ This means ui tests can fail depending on how long the path to their file is. Some ui tests actually rely on this behaviour for their assertions, so for those we enable the flag manually.
2023-07-23match on chars instead of &strs for .split() or .strip_prefix()Matthias Krüger-1/+1
2023-07-21Revert "Auto merge of #113166 - moulins:ref-niches-initial, r=oli-obk"David Tolnay-30/+0
This reverts commit 557359f92512ca88b62a602ebda291f17a953002, reversing changes made to 1e6c09a803fd543a98bfbe1624d697a55300a786.
2023-07-21Auto merge of #113166 - moulins:ref-niches-initial, r=oli-obkbors-0/+30
Prototype: Add unstable `-Z reference-niches` option MCP: rust-lang/compiler-team#641 Relevant RFC: rust-lang/rfcs#3204 This prototype adds a new `-Z reference-niches` option, controlling the range of valid bit-patterns for reference types (`&T` and `&mut T`), thereby enabling new enum niching opportunities. Like `-Z randomize-layout`, this setting is crate-local; as such, references to built-in types (primitives, tuples, ...) are not affected. The possible settings are (here, `MAX` denotes the all-1 bit-pattern): | `-Z reference-niches=` | Valid range | |:---:|:---:| | `null` (the default) | `1..=MAX` | | `size` | `1..=(MAX- size)` | | `align` | `align..=MAX.align_down_to(align)` | | `size,align` | `align..=(MAX-size).align_down_to(align)` | ------ This is very WIP, and I'm not sure the approach I've taken here is the best one, but stage 1 tests pass locally; I believe this is in a good enough state to unleash this upon unsuspecting 3rd-party code, and see what breaks.
2023-07-21add crate-local `-Z reference_niches` unstable flag (does nothing for now)Moulins-0/+30
2023-07-17print on rustc_codegen_llvm and rename malloc and cpy c_charkhei4-3/+3
2023-07-16Don't enable by default :)Patrick Walton-1/+1
2023-07-16rustc_llvm: Add a `-Z print-llvm-stats` option to expose LLVM statistics.Patrick Walton-0/+3
LLVM has a neat [statistics] feature that tracks how often optimizations kick in. It's very handy for optimization work. Since we expose the LLVM pass timings, I thought it made sense to expose the LLVM statistics too. [statistics]: https://llvm.org/docs/ProgrammersManual.html#the-statistic-class-stats-option
2023-07-08Replace RPITIT current impl with new strategy that lowers as a GATSantiago Pastorino-3/+0
2023-07-05Auto merge of #112697 - tgross35:explain-markdown, r=oli-obkbors-0/+2
Add simple markdown formatting to `rustc --explain` output This is a second attempt at #104540, which is #63128 without dependencies. This PR adds basic markdown formatting to `rustc --explain` output when available. Currently, the output just displays raw markdown: this works of course, but it really doesn't look very elegant. (output is `rustc --explain E0038`) <img width="583" alt="image" src="https://github.com/rust-lang/rust/assets/13724985/ea418117-47af-455b-83c0-6fc59276efee"> After this patch, sample output from the same file: <img width="693" alt="image" src="https://github.com/rust-lang/rust/assets/13724985/12f7bf9b-a3fe-4104-b74b-c3e5227f3de9"> This also obeys the `--color always/auto/never` command option. Behavior: - If pager is available and supports color, print with formatting to the pager - If pager is not available or fails print with formatting to stdout - otherwise without formatting - Follow `--color always/never` if suppied - If everything fails, just print plain text to stdout r? `@oli-obk` cc `@estebank` (since the two of you were involved in the previous discussion)