Commit graph

313750 commits

Author SHA1 Message Date
Urgau
4d839da22b Remap both absolute and relative paths when building rustc and std 2025-12-22 19:44:13 +01:00
Urgau
1b8ee46683 Add needs-std-remap-debuginfo directive to compiletest & run-make 2025-12-22 17:55:25 +01:00
bors
a6525d5264 Auto merge of #150180 - dianqk:update-llvm, r=cuviper
Update LLVM submodule

Fixes https://github.com/rust-lang/rust/issues/149813.
2025-12-21 14:22:48 +00:00
bors
d3f16d2f35 Auto merge of #149437 - ilammy:patch-1, r=Mark-Simulacrum
Fix trailing newline in JUnit formatter

`write_message()` expects messages to contain no newlines.

Fixes https://github.com/rust-lang/rust/issues/149436
2025-12-21 10:37:51 +00:00
bors
d0e6d778cf Auto merge of #150215 - GuillaumeGomez:subtree-update_cg_gcc_2025-12-21, r=antoyo
sync GCC backend 2025-12-21

r? ghost
2025-12-21 07:24:05 +00:00
Guillaume Gomez
d5b6bd87ec Merge commit '02f889aec5' 2025-12-21 00:13:38 +01:00
antoyo
02f889aec5
Merge pull request #820 from rust-lang/sync_from_rust_2025_12_20
Sync from rust 2025/12/20
2025-12-20 18:08:23 -05:00
Antoni Boucher
1ac26a7b1c Add new failing tests 2025-12-20 17:31:53 -05:00
Antoni Boucher
93cf63b789 Move libgccjit.so to the new location within the sysroot 2025-12-20 17:08:08 -05:00
Antoni Boucher
cd8cc6ff38 Update to nightly-2025-12-20 2025-12-20 16:43:54 -05:00
Antoni Boucher
cf522c098c Merge branch 'master' into sync_from_rust_2025_12_20 2025-12-20 16:43:21 -05:00
bors
cb79c42008 Auto merge of #148329 - LorrensP-2158466:closure-prop, r=lcnr
Better closure requirement propagation.

Fixes rust-lang/rust#148289
Fixes rust-lang/rust#104477
Should unblock rust-lang/rust#148187

When propagating closure requirements we:
- no longer try to find a post dominiting region for the list of non-local lower bounds of `longer_fr`.
- we filter the list of `longer_fr-: shorter_fr+` to only these constraints between external regions which are required regardless. If no such constraint exists, we fall back to propagating all of them.

See the [FCP](https://github.com/rust-lang/rust/pull/148329#issuecomment-3581019253) for more information.

r? `@lcnr`
2025-12-20 21:05:32 +00:00
bors
24139cf844 Auto merge of #150199 - JonathanBrouwer:rollup-pjxlhel, r=JonathanBrouwer
Rollup of 2 pull requests

Successful merges:

 - rust-lang/rust#150188 (Dogfood `strip_circumfix`)
 - rust-lang/rust#150198 (Port `#[thread_local]` to attribute parser)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-20 16:01:33 +00:00
Jonathan Brouwer
73292d90e8
Rollup merge of #150198 - Bryntet:parse_thread_local, r=JonathanBrouwer
Port `#[thread_local]` to attribute parser

Simple port, only thing that might be an issue is the `help: #[thread_local] can be applied to foreign statics and statics` it probably would be that if an attribute is applicable to both statics and foreign statics that we don't alphabetically sort them next to each other, because now it kinda reads like `#[thread_local]` is something that you primarily use on foreign statics

r? `@JonathanBrouwer`
2025-12-20 16:24:06 +01:00
Jonathan Brouwer
ba753c6034
Rollup merge of #150188 - yotamofek:pr/dogfood-strip-circumfix, r=Kivooeo
Dogfood `strip_circumfix`

cc rust-lang/rust#147946
Truth be told, I expected to find more places where this can be used in the compiler.
Seems cargo, clippy and rustfmt can use this much more frequently, but I'll have to wait (I think?) for the next two-way sync to be able to dogfood it in those repos.
2025-12-20 16:24:05 +01:00
Edvin Bryntesson
120f0d4f07
Port #[thread_local] to attribute parser 2025-12-20 15:38:42 +01:00
bors
b53da99081 Auto merge of #150190 - matthiaskrgr:rollup-tjdmcar, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#146747 (rustc_codegen_llvm: Tidying of `update_target_reliable_float_cfg`)
 - rust-lang/rust#148499 (Nvptx: Use llbc as default linker)
 - rust-lang/rust#148991 (miri genmc: fix exit() handling)
 - rust-lang/rust#150172 (Handle remapped paths correctly when generating "Source" links)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-20 12:48:06 +00:00
Matthias Krüger
6c0e803afa
Rollup merge of #150172 - Urgau:rustdoc-remap-fixes, r=GuillaumeGomez
Handle remapped paths correctly when generating "Source" links

Fixes https://github.com/rust-lang/rust/issues/150100.

This PR fixes a regression introduced by [#149709](https://github.com/rust-lang/rust/issues/149709), I was overzealous in my changes (https://github.com/rust-lang/rust/pull/149709/changes#diff-e1cf7ef2fb411d24980cd4cbea1e867cc36029e9496e1ceca64cfb6a0e3510f6) and accidentally changed the behavior of `rustdoc` in the presence of remapped, to simply reject them instead of handling them.

With this PR remapped paths are handled correctly, in a similar way as it was before.

~~I added a run-make test to make sure we don't regress it again, a simple `rustdoc` test in not sufficient as `rustdoc` is not called on the auxiliary crate. It's not pretty but it works.~~ https://github.com/rust-lang/rust/pull/150172#issuecomment-3676762399

rustdoc doesn't have any handling for `--remap-path-scope`, so I used the `MACRO` scope (it was already used [elsewhere](b889870082/src/librustdoc/clean/types.rs (L154)).

cf. https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/source.20links.20missing.20for.20nightly.20std.20docs
2025-12-20 13:46:01 +01:00
Matthias Krüger
ce3f9039d9
Rollup merge of #148991 - RalfJung:genmc-exit, r=oli-obk
miri genmc: fix exit() handling

In genmc mode, Miri does not want to stop execution when `exit` is called. Instead we want to continue running other threads to ensure we covered all possible concurrent behaviors (including the ones where the exiting thread was delayed so the other threads took their turns first). However, the core interpreter has a sanity check that prevents us from just doing nothing in `exit`. This leaves us in a pickle: there's nowhere we can jump to (exit has return type `!` so there's no next block), but if we don't jump anywhere we ICE.

The first commit fixes that by disabling the sanity check when there is no block to jump to. That still catches the mistake of forgetting to jump for the vast majority of shims.

We currently don't build Miri's genmc integration in rustc CI so I had to hack the feature into the bootstrap miri integration. That turned out to use the wrong Miri binary, which is fixed by the second commit: we can just rely on CARGO_BIN_EXE_miri, there's no need for a MIRI environment variable.

r? ``@oli-obk``
2025-12-20 13:46:00 +01:00
Matthias Krüger
5a875b8580
Rollup merge of #148499 - kjetilkjeka:nvptx_default_linker_llbc, r=madsmtm
Nvptx: Use llbc as default linker

The implementation of [MCP: Use `llvm-bitcode-linker` as the default linker for `nvptx64-nvidia-cuda`](https://github.com/rust-lang/compiler-team/issues/927)
2025-12-20 13:46:00 +01:00
Matthias Krüger
676348b75c
Rollup merge of #146747 - a4lg:codegen-llvm-feature-float-tidying, r=petrochenkov
rustc_codegen_llvm: Tidying of `update_target_reliable_float_cfg`

This PR simplifies floating type handling through `update_target_reliable_float_cfg` based on several facts:

1.  Major changes in behavior normally occurs only on the major LLVM upgrade.
2.  The first release of LLVM 20.x.x is 20.1.0.

Due to the first fact, we can normally ignore minor and patch releases of LLVM and we can remove obscure variables like `lt_xx_x_x`.
The second fact is missed when the minimum LLVM version is raised to LLVM 20 (cf. rust-lang/rust#145071) and one "fixed in LLVM 20" case can be safely removed (another cannot be removed since it's fixed on LLVM 20.1.1).

It also reorders certain `match` clauses by the architecture when there's no problems reordering it.

Note that, an LLVM issue on MIPS is fixed on LLVM 20.1.**0** and another on AArch64 is fixed on LLVM 20.1.**1**.
Originally, they are both considered fixed on LLVM 20.1.**1** but the author separated them into two cases (so that the MIPS bug checking can be removed).
2025-12-20 13:45:59 +01:00
Yotam Ofek
462a8b3410 Dogfood strip_circumfix 2025-12-20 13:56:25 +02:00
bors
d0835adc4e Auto merge of #150181 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

13 commits in e91b2baa632c0c7e84216c91ecfe107c37d887c1..3861f60f6b58f57524c0e7aab1f5c1ad83e35409
2025-12-13 16:29:21 +0000 to 2025-12-19 21:53:33 +0000
- fix(sbom): Don't set CARGO_SBOM_PATH when empty (like stable)  (rust-lang/cargo#16419)
- chore(ci): report-timings to upload HTML report (rust-lang/cargo#16416)
- fix(report): get the same feature parity of `--timings` (rust-lang/cargo#16414)
- fix(docs): Document the only possible values for DEBUG in build scripts (rust-lang/cargo#16413)
- fix(log): emit fingeprint log also for no-rebuild unit (rust-lang/cargo#16408)
- Fix link to `doc_cfg` docs in cargo book (rust-lang/cargo#16404)
- Add best pratice for how to check in generated files (rust-lang/cargo#16405)
- test: Use a larger default term width (rust-lang/cargo#16403)
- Document more services and permissions of the cargo team (rust-lang/cargo#16402)
- fix(new): Improve quality of package name error messages (rust-lang/cargo#16398)
- feat(log): add more log events (rust-lang/cargo#16390)
- chore: bump to 0.95.0; update changelog (rust-lang/cargo#16395)
- Cache submodule into git db (rust-lang/cargo#16246)

r? ghost
2025-12-20 08:28:57 +00:00
Tsukasa OI
42d9f099e0 rustc_codegen_llvm: Reorder by arch in update_target_reliable_float_cfg
This commit reorders certain match clauses in
`update_target_reliable_float_cfg` by the architecture when
there's no problems reordering it.
2025-12-20 07:21:01 +00:00
Tsukasa OI
28203e182f rustc_codegen_llvm: Simplify update_target_reliable_float_cfg
This commit simplifies floating type handling through
`update_target_reliable_float_cfg` based on several facts:

1.  Major changes in behavior normally occurs only
    on the major LLVM upgrade.
2.  The first release of LLVM 20.x.x is 20.1.0.

Due to the first fact, we can normally ignore minor and patch releases
of LLVM and we can remove obscure variables like `lt_xx_x_x` (still,
there is a case where checking for patch version is required).

The second fact is missed when the minimum LLVM version is raised to
LLVM 20 and one "fixed in LLVM 20" case can be safely removed.
2025-12-20 07:21:01 +00:00
Tsukasa OI
572ca1eb74 rustc_codegen_llvm: Split "Fixed in LLVM 20" cases
... in `update_target_reliable_float_cfg`, based on the actual changes.
The AArch64 issue is fixed on LLVM 20.1.1 while the MIPS issue is fixed
on LLVM 20.1.0 (the first LLVM 20 release).

This commit distinguishes two separate cases.
2025-12-20 07:21:01 +00:00
bors
838a912ced Auto merge of #150177 - matthiaskrgr:rollup-4cw3gdw, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#149633 (Enable `outline-atomics` by default on AArch64 FreeBSD)
 - rust-lang/rust#149788 (Move shared offload globals and define per-kernel globals once)
 - rust-lang/rust#149989 (Improve filenames encoding and misc)
 - rust-lang/rust#150012 (rustc_target: Add `efiapi` ABI support for LoongArch)
 - rust-lang/rust#150116 (layout: Store inverse memory index in `FieldsShape::Arbitrary`)
 - rust-lang/rust#150159 (Split eii macro expansion code)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-12-20 05:17:27 +00:00
bors
f51d1bcdc6 Auto merge of #149831 - BoxyUwU:boostrap_bump, r=Mark-Simulacrum,cuviper
bump bootstrap compiler to 1.93 beta

r? release
2025-12-20 02:06:29 +00:00
Weihang Lo
3e5b12ed9a
Update cargo submodule 2025-12-19 21:06:09 -05:00
dianqk
361888f763
Update LLVM submodule 2025-12-20 09:53:08 +08:00
Guillaume Gomez
c039edd414 Fix typo 2025-12-20 00:32:56 +01:00
Josh Stone
b22b343faf Revert "Generate macro expansion for rust compiler crates docs"
This reverts commit c820f46122 due to an
ICE encountered while bumping the bootstrap compiler to 1.93-beta.
2025-12-19 15:06:11 -08:00
Boxy
df780f87c7 Update compiler/rustc_lint_defs/src/builtin.rs
Co-authored-by: León Orell Valerian Liehr <me@fmease.dev>
2025-12-19 15:04:30 -08:00
Boxy Uwu
8321ad2369 update missing targets list 2025-12-19 15:04:30 -08:00
Boxy Uwu
2ffb1d55ef Handle bootstrap cfgs 2025-12-19 15:04:30 -08:00
Boxy Uwu
93fc203606 bump stage0 2025-12-19 15:04:30 -08:00
Boxy Uwu
90a33f69f4 replace version placeholder 2025-12-19 15:04:30 -08:00
Matthias Krüger
8022c68ac8
Rollup merge of #150159 - jdonszelmann:split-eii-macro, r=jonathanbrouwer
Split eii macro expansion code

r? jonathanbrouwer (since you did the last one too, should be quite trivial)

While investigating rust-lang/rust#149980 I decided this code deserved some splitting :)
2025-12-19 23:39:00 +01:00
Matthias Krüger
22440fd686
Rollup merge of #150116 - moulins:layout-inv-memory-index, r=workingjubilee
layout: Store inverse memory index in `FieldsShape::Arbitrary`

All usages of `memory_index` start by calling `invert_bijective_mapping`, so storing the inverted mapping directly saves some work and simplifies the code.
2025-12-19 23:38:59 +01:00
Matthias Krüger
fdae594a74
Rollup merge of #150012 - heiher:loong-efiapi, r=davidtwco
rustc_target: Add `efiapi` ABI support for LoongArch

This commit adds basic `efiapi` ABI support for LoongArch by recognizing `extern "efiapi"` in the ABI map and inline asm clobber handling, and mapping it to the C calling convention.

This change is intentionally submitted ahead of the full LoongArch UEFI target support. While UEFI binaries are ultimately produced as PE images, LoongArch UEFI applications can already be developed by building ELF objects, applying relocation fixups, and converting them to PE in a later step. For such workflows, having `efiapi` properly recognized by the compiler is a prerequisite, even without a dedicated UEFI target.

Landing this ABI support early helps unblock LoongArch UEFI application and driver development, and allows the remaining UEFI-specific pieces to be introduced incrementally in follow-up patches.

MCP: https://github.com/rust-lang/compiler-team/issues/953
2025-12-19 23:38:59 +01:00
Matthias Krüger
7ec7a928c4
Rollup merge of #149989 - Urgau:filenames-post-improvements, r=davidtwco
Improve filenames encoding and misc

This PR is a follow-up to https://github.com/rust-lang/rust/pull/149709, it aims at preventing a double encoding when there are no remapping, as well as making some small improvements to the code.

Best reviewed commit by commit.
2025-12-19 23:38:58 +01:00
Matthias Krüger
508c382080
Rollup merge of #149788 - Sa4dUs:offload-cleanup, r=ZuseZ4
Move shared offload globals and define per-kernel globals once

This PR moves the shared LLVM global variables logic out of the `offload` intrinsic codegen and generates kernel-specific variables only ont he first call of the intrinsic.

r? `@ZuseZ4`

tracking:
- https://github.com/rust-lang/rust/issues/131513
2025-12-19 23:38:57 +01:00
Matthias Krüger
056da3e0ca
Rollup merge of #149633 - tgross35:freebsd-outline-atomics, r=davidtwco
Enable `outline-atomics` by default on AArch64 FreeBSD

Many aarch64 targets without LSE in the baseline enable the
`outline-atomics` feature, which uses runtime detection of LSE for its
faster atomic ops. This provides nontrivial performance improvements on
most hardware from the past decade, at a small cost to anything pre-LSE.

This matches what Clang does [1].

Context: https://github.com/rust-lang/rust/pull/144938

[1]: e24f90190c

try-job: dist-x86_64-freebsd
2025-12-19 23:38:57 +01:00
bors
9044e98b66 Auto merge of #150111 - daxpedda:wasm-gc, r=alexcrichton
Add `target_feature = "gc"` for Wasm

This PR adds a new target feature for Wasm targets: [GC](https://github.com/WebAssembly/gc).

~~I went ahead and made this insta-stable because it has already [passed phase 5](88e7bd6ba9/finished-proposals.md) in addition to being [implemented and stabilized by all major JS engines](https://webassembly.org/features).~~

~~This doesn't enable the target feature by default!~~

For context: while this proposal adds a lot of new features to Wasm, they are not accessible through Rust apart from unstable inline ASM. This is largely useful to signal tools to make use of the feature, e.g. `wasm-bindgen`, where this can be used to make some pretty optimizations.

Companion PR: https://github.com/rust-lang/reference/pull/2114.

r? `@alexcrichton`
2025-12-19 22:35:39 +00:00
Urgau
811c241b3d Handle remapped paths correctly when generating "Source" links 2025-12-19 23:22:08 +01:00
Urgau
81d86bf0eb Add regression test for remap-path-prefix handling in rustdoc for deps 2025-12-19 23:21:24 +01:00
Kjetil Kjeka
746acc47a1 Nvptx: Use llbc as default linker 2025-12-19 21:39:48 +01:00
daxpedda
4ee01c4e4c
Add target_feature = "gc" for Wasm 2025-12-19 20:22:43 +01:00
bors
806c2a35dc Auto merge of #150056 - Kivooeo:trying-to-address-perf, r=davidtwco
Perf regression fix

The only thing changed from the previous PR is that I removed `output_is_inhabited` from hot path, and hide it behind condition, so now it will compute it less frequent

follow up on https://github.com/rust-lang/rust/pull/149664
2025-12-19 18:18:11 +00:00
Jana Dönszelmann
6608f6ace7
split up expansion code of eii macro into functions 2025-12-19 18:43:04 +01:00