about summary refs log tree commit diff
path: root/compiler/rustc_session/src
AgeCommit message (Collapse)AuthorLines
2024-10-31Remove support for `-Zprofile` (gcov-style coverage instrumentation)Zalathar-18/+1
2024-10-30fix libc call from i8 to u8Henry Jiang-1/+1
2024-10-29Rollup merge of #131375 - klensy:clone_on_ref_ptr, r=cjgillotJubilee-5/+6
compiler: apply clippy::clone_on_ref_ptr for CI Apply lint https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_ref_ptr for compiler, also see https://github.com/rust-lang/rust/pull/131225#discussion_r1790109443. Some Arc's can be misplaced with Lrc's, sorry. https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/enable.20more.20clippy.20lints.20for.20compiler.20.28and.5Cor.20std.29
2024-10-28fix clippy::clone_on_ref_ptr for compilerklensy-5/+6
2024-10-27compiler: Add rustc_abi dependence to the compilerJubilee Young-2/+2
Depend on rustc_abi in compiler crates that use it indirectly but have not yet taken on that dependency, and are not entangled in my other PRs. This leaves an "excise rustc_target" step after the dust settles.
2024-10-20Limited -Zregparm support (no Rust calling conv) descriptionsAndrew Zhogin-1/+2
Co-authored-by: Jubilee <workingjubilee@gmail.com>
2024-10-18rust_for_linux: -Zregparm=<N> commandline flag for X86 (#116972)Andrew Zhogin-0/+23
2024-10-15stabilize `-Znext-solver=coherence`lcnr-21/+15
2024-10-12Rollup merge of #131626 - matthiaskrgr:dont_string, r=lqdTrevor Gross-1/+1
remove a couple of redundant String to String conversion
2024-10-12Rollup merge of #131277 - ↵Matthias Krüger-1/+1
ismailarilik:handle-potential-query-instability-lint-for-clippy, r=xFrednet Handle `clippy` cases of `rustc::potential_query_instability` lint This PR removes `#![allow(rustc::potential_query_instability)]` line from [`src/tools/clippy/clippy_lints/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/src/tools/clippy/clippy_lints/src/lib.rs#L30) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors. A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447
2024-10-12remove a couple of redundant String to String conversionMatthias Krüger-1/+1
2024-10-10Avoid redundant additions to PATH when linkingMads Marquart-0/+2
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.