about summary refs log tree commit diff
path: root/compiler/rustc_session/src
AgeCommit message (Collapse)AuthorLines
2024-10-06Rename NestedMetaItem to MetaItemInnercodemountains-1/+1
2024-10-05Handle `clippy` cases of `rustc::potential_query_instability` lintismailarilik-1/+1
2024-10-04Rollup merge of #131034 - Urgau:cfg-true-false, r=nnethercoteGuillaume Gomez-1/+1
Implement RFC3695 Allow boolean literals as cfg predicates This PR implements https://github.com/rust-lang/rfcs/pull/3695: allow boolean literals as cfg predicates, i.e. `cfg(true)` and `cfg(false)`. r? `@nnethercote` *(or anyone with parser knowledge)* cc `@clubby789`
2024-10-02Rollup merge of #126930 - Xaeroxe:file-checksum-hint, r=chenyukangJubilee-1/+22
Add unstable support for outputting file checksums for use in cargo Adds an unstable option that appends file checksums and expected lengths to the end of the dep-info file such that `cargo` can read and use these values as an alternative to file mtimes. This PR powers the changes made in this cargo PR https://github.com/rust-lang/cargo/pull/14137 Here's the tracking issue for the cargo feature https://github.com/rust-lang/cargo/issues/14136.
2024-10-02Adjust check-cfg get_many_mut usage following API changeUrgau-12/+12
2024-10-01improve shell help textJacob Kiesel-1/+2
2024-10-01disregard what we believe is supported in cargo for hash typeJacob Kiesel-5/+1
2024-10-01Fix options help textJacob Kiesel-1/+1
2024-10-01add unstable support for outputting file checksums for use in cargoJacob Kiesel-1/+25
2024-10-01Replace -Z default-hidden-visibility with -Z default-visibilityDavid Lattimore-10/+30
MCP: https://github.com/rust-lang/compiler-team/issues/782 Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
2024-10-01Use `ast::NestedMetaItem` when evaluating cfg predicateUrgau-1/+1
2024-09-27Rollup merge of #129087 - slanterns:option_get_or_insert_default, r=dtolnayMatthias Krüger-1/+0
Stabilize `option_get_or_insert_default` Closes: https://github.com/rust-lang/rust/issues/82901. `@rustbot` label: +T-libs-api r? libs-api
2024-09-24Test fixing raw-dylibDaniel Paoliello-0/+5
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-28/+28
2024-09-17Rollup merge of #128961 - GKFX:issue-128930-explain-missing-option, r=jieyouxuMatthias Krüger-1/+1
Fix #128930: Print documentation of CLI options missing their arg Fix #128930. Failing to give an argument to CLI options which require it now prints something like: ``` $ rustc --print error: Argument to option 'print' missing Usage: --print [crate-name|file-names|sysroot|target-libdir|cfg|check-cfg|calling-conventions|target-list|target-cpus|target-features|relocation-models|code-models|tls-models|target-spec-json|all-target-specs-json|native-static-libs|stack-protector-strategies|link-args|deployment-target] Compiler information to print on stdout ```
2024-09-15Rollup merge of #129897 - RalfJung:soft-float-ignored, r=UrgauMatthias Krüger-1/+25
deprecate -Csoft-float because it is unsound (and not fixable) See https://github.com/rust-lang/rust/issues/129893 for details. The general sentiment there seems to be that this flag has no use and sound alternatives exist, so let's add this warning and see if anyone out there disagrees. Also show a different warning on targets where it does nothing (as documented since https://github.com/rust-lang/rust/pull/36261): it seems to correspond to `-mfloat-abi` in GCC/clang, which is an ARM-specific option. To be really sure it does nothing, only forward the flag to LLVM for eabihf targets. This should not change behavior but makes me sleep better ;)
2024-09-13Add set_dcx to ParseSessVetle Rasmussen-0/+4
2024-09-12Auto merge of #130249 - compiler-errors:sad-new-solver-coherence, r=lcnrbors-15/+21
Revert "Stabilize `-Znext-solver=coherence`" This is a clean revert of #121848, prepared by running: ``` $ git revert 17b322fa69eed7216dccc9f097eb68237cf62234 -m1 ``` Which effectively reverts: * a138a9261536ac2bdbb7c01a8aa9dc7d43299cae, 69fdd1457d367ce4de044e9784e58a38acf3d847, d93e047c9f1b33892a604273ab3931815f5604a1, 1a893ac648e03732aaa8b5371b602ab683970b0d see: https://rust-lang.zulipchat.com/#narrow/stream/364551-t-types.2Ftrait-system-refactor/topic/nalgebra.20hang Closes #130056 r? lcnr
2024-09-12Auto merge of #117465 - paulmenage:small-data-limit, r=compiler-errorsbors-2/+18
Add -Z small-data-threshold This flag allows specifying the threshold size above which LLVM should not consider placing small objects in a `.sdata` or `.sbss` section. Support is indicated in the target options via the small-data-threshold-support target option, which can indicate either an LLVM argument or an LLVM module flag. To avoid duplicate specifications in a large number of targets, the default value for support is DefaultForArch, which is translated to a concrete value according to the target's architecture.
2024-09-11Rollup merge of #130114 - eduardosm:needless-returns, r=compiler-errorsJubilee-2/+2
Remove needless returns detected by clippy in the compiler
2024-09-11Revert 'Stabilize -Znext-solver=coherence'Michael Goulet-15/+21
2024-09-11Make SearchPath::new publicVetle Rasmussen-1/+1
2024-09-10Add -Z small-data-thresholdPaul Menage-2/+18
This flag allows specifying the threshold size above which LLVM should not consider placing small objects in a .sdata or .sbss section. Support is indicated in the target options via the small-data-threshold-support target option, which can indicate either an LLVM argument or an LLVM module flag. To avoid duplicate specifications in a large number of targets, the default value for support is DefaultForArch, which is translated to a concrete value according to the target's architecture.
2024-09-09Remove needless returns detected by clippy in the compilerEduardo Sánchez Muñoz-2/+2
2024-09-05stabilize `-Znext-solver=coherence`lcnr-21/+15
2024-09-03add rustc_lint_opt_deny_field_access to options that are documented to do ↵Ralf Jung-0/+3
nothing
2024-09-03deprecate -Csoft-float because it is unsound (and not fixable)Ralf Jung-1/+22
2024-09-03Auto merge of #129777 - nnethercote:unreachable_pub-4, r=Urgaubors-69/+74
Add `unreachable_pub`, round 4 A follow-up to #129732. r? `@Urgau`
2024-09-03Add `warn(unreachable_pub)` to `rustc_session`.Nicholas Nethercote-69/+74
2024-09-02chore: Fix typos in 'compiler' (batch 2)Alexander Cyon-5/+5
2024-08-30make `-Z mir-include-spans` a dedicated enumRémy Rakic-2/+38
We want to allow setting this on the CLI, override it only in MIR passes, and disable it altogether in mir-opt tests. The default value is "only for NLL MIR dumps", which is considered off for all intents and purposes, except for `rustc_borrowck` when an NLL MIR dump is requested.
2024-08-29Rollup merge of #128970 - DianQK:lint-llvm-ir, r=nikicGuillaume Gomez-0/+2
Add `-Zlint-llvm-ir` This flag is similar to `-Zverify-llvm-ir` and allows us to lint the generated IR. r? compiler
2024-08-29Add `-Zlint-llvm-ir`DianQK-0/+2
2024-08-28fmt-debug optionKornel-3/+54
Allows disabling `fmt::Debug` derive and debug formatting.
2024-08-28Rollup merge of #129667 - dev-ardi:rustc_driver-cleanup, r=michaelwoeristerMatthias Krüger-0/+1
Rustc driver cleanup This adds a few comments to the driver to clarify a bit what's happening and does some cleanup.
2024-08-28clarify a few thingsOrion Gonzalez-0/+1
2024-08-27Rollup merge of #129418 - petrochenkov:libsearch2, r=jieyouxuTrevor Gross-29/+3
rustc: Simplify getting sysroot library directory It was very non-obvious that `sess.target_tlib_path`, `make_target_lib_path(...)`, and `sess.target_filesearch(...).search_paths()` result in the same sysroot library directory paths. They are however, indeed the same, because `sess.target_tlib_path` is initialized to `make_target_lib_path(...)` on `Session` creation, and they are used interchangeably. There are still some redundant calls to `make_target_lib_path` and other inconsistent ways to obtain sysroot directories, but fixing that requires some behavior changes, while this PR is a pure refactoring. Some places in the compiler even disagree on the number of sysroots - 1 (explicit `--sysroot` *or* default sysroot), 2 (explicit `--sysroot` *and* default sysroot), or an unclear number of `sysroot_candidates` every of which is considered. The logic currently using `sess.target_tlib_path` or equivalents assumes one sysroot.
2024-08-27Rollup merge of #126985 - Mrmaxmeier:dwarf-embed-source, r=davidtwcoTrevor Gross-2/+28
Implement `-Z embed-source` (DWARFv5 source code embedding extension) Implement https://github.com/rust-lang/compiler-team/issues/764 MCP which adds an unstable flag that exposes LLVM's [DWARFv5 source code embedding](https://dwarfstd.org/issues/180201.1.html) support.
2024-08-22rustc: Simplify getting sysroot library directoryVadim Petrochenkov-29/+3
2024-08-15Rollup merge of #128348 - ↵Matthias Krüger-1/+6
dingxiangfei2009:allow-shadow-call-stack-sanitizer, r=tmandry Unconditionally allow shadow call-stack sanitizer for AArch64 It is possible to do so whenever `-Z fixed-x18` is applied. cc ``@Darksonn`` for context The reasoning is that, as soon as reservation on `x18` is forced through the flag `fixed-x18`, on AArch64 the option to instrument with [Shadow Call Stack sanitizer](https://clang.llvm.org/docs/ShadowCallStack.html) is then applicable regardless of the target configuration. At the every least, we would like to relax the restriction on specifically `aarch64-unknonw-none`. For this option, we can include a documentation change saying that users of compiled objects need to ensure that they are linked to runtime with Shadow Call Stack instrumentation support. Related: #121972
2024-08-14stabilize `option_get_or_insert_default`Slanterns-1/+0
2024-08-11Fix #128930: Print documentation of CLI options missing their argGeorge Bateman-1/+1
2024-08-11Rollup merge of #128762 - fmease:use-more-slice-pats, r=compiler-errorsMatthias Krüger-10/+3
Use more slice patterns inside the compiler Nothing super noteworthy. Just replacing the common 'fragile' pattern of "length check followed by indexing or unwrap" with slice patterns for legibility and 'robustness'. r? ghost
2024-08-09unconditionally allow shadow call-stack for AArch64 whenever fixed-x18 is ↵Ding Xiang Fei-1/+6
applied
2024-08-09Rollup merge of #128806 - estebank:color-config, r=jieyouxuMatthias Krüger-28/+40
Split `ColorConfig` off of `HumanReadableErrorType` The previous setup tied two unrelated things together. Splitting these two is a better model. Identified by https://github.com/rust-lang/rust/pull/126597/files#r1667800754
2024-08-08review commentsEsteban Küber-2/+2
2024-08-08Split `ColorConfig` off of `HumanReadableErrorType`Esteban Küber-28/+40
The previous setup tied two unrelated things together. Splitting these two is a better model.
2024-08-07Rollup merge of #128702 - yaahc:metrics-flag, r=estebankTrevor Gross-0/+2
Add -Zmetrics-dir=PATH to save diagnostic metadata to disk r? ``@estebank``
2024-08-07Add -Zerror-metrics=PATH to save diagnostic metadata to diskJane Losare-Lusby-0/+2
2024-08-07Disallow setting built-in cfgs via set the command-lineUrgau-1/+69