Rollup of 21 pull requests - #160437
Closed
JonathanBrouwer wants to merge 281 commits into
Closed
Conversation
Adds an unstable `extern "Swift"` ABI behind the `abi_swift` feature gate, mapping to LLVM's `swiftcc` calling convention. Cranelift and GCC backends fall back to the platform default since they have no equivalent.
Add Swift function call ABI Adds an unstable `extern "Swift"` ABI behind the `abi_swift` feature gate, mapping to LLVM's `swiftcc` calling convention. This is only allowed (a) for `is_darwin_like` targets, since the [ABI is only stable for those platforms](https://www.swift.org/blog/abi-stability-and-more/) and (b) with the LLVM backend, since the other backends don't support it. Current approaches to interoperability with Swift lower to Objective-C (or require a Swift stub exposing a C ABI), but that is an optional mapping on the Swift side that some newer Apple frameworks omit. It would be great to be able to more directly/natively be able to call into Swift code directly via its stable API (on Apple platforms at least). Reimplements rust-lang#64582 on top of current main. The main objection to the previous PR seemed to be that it needed an RFC, but there was pushback (which seems sensible to me) that an RFC could be deferred until stabilization. I think this needs a tracking issue? Would be happy to write one up if/when there is a consensus that this will be merged.
Add CI check when building sysroot with GCC backend and running libcore tests with it Fixes rust-lang/rustc_codegen_gcc#882. Is it what you had in mind @Kobzol? r? @Kobzol
Turns out these were all making `OperandValue::Immediate`s already -- the intrinsic always returns a primitive scalar -- so pretty easy to handle. While I was looking at it, I also "rustified" the intrinsic signature a bit: returning a `bool` and taking a generic pointee and `unsafe fn`s cleans up the call in `std` a bit without making the implementation in the backend any harder.
…nwind, r=dianqk Stop needing an alloca for `catch_unwind` Turns out these were all making `OperandValue::Immediate`s already -- the intrinsic always returns a primitive scalar -- so pretty easy to handle. cc rust-lang#153250 rust-lang/compiler-team#970 While I was looking at it, I also "rustified" the intrinsic signature a bit: returning a `bool` and taking a generic pointee and `unsafe fn`s cleans up the call in `std` a bit without making the implementation in the backend any harder. r? dianqk
Couple of changes to help with moving LTO to the link phase Part of rust-lang/compiler-team#908
A `SwitchInt` with only an `otherwise` target reaches the backend as a switch with an empty case list. `gcc_jit_block_end_with_switch` requires an integer discriminant, so it rejects the `bool` discriminant produced by a range-pattern comparison under `-Zmir-preserve-ub`, which keeps the otherwise-simplified switch instead of lowering it to a `goto`. Such a switch is equivalent to an unconditional jump to the default block, so emit that instead.
Unlike the compile-time TEST_FLAGS, this is read at run time so a single test can opt into flags such as -Zmir-preserve-ub through an ignore-if directive that checks whether the variable is set.
A range-pattern match compiled with -Zmir-preserve-ub leaves a SwitchInt with no cases whose discriminant is a bool comparison result. The test is skipped unless CARGO_TEST_FLAGS is set so it only runs when that flag is passed.
…5_28 Sync from rust 2026/05/28
Regen intrinsics
The test opts into -Zmir-preserve-ub through CARGO_TEST_FLAGS and is skipped when that variable is unset, so the default cargo-tests run never exercises it. Invoke it explicitly with the flag set.
…-cases builder: Emit a plain jump for a switch with no cases
Contributor
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 3, 2026
Rollup of 21 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1 try-job: i686-msvc-* try-job: dist-i686-linux try-job: dist-aarch64-linux
Contributor
Author
|
@bors p=7 |
Contributor
|
⌛ Testing commit 861dd34 with merge b6b6abb... Workflow: https://github.com/rust-lang/rust/actions/runs/30825363920 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 3, 2026
…uwer Rollup of 21 pull requests Successful merges: - #159844 (Subtree cg_gcc sync (2026-07-24)) - #159326 (Deny multiple EII impls on a single item) - #159535 (Optimize slice::contains for bytewise types) - #159595 (Promote loongarch32-unknown-none* to Tier 2) - #160007 (allow `-Ldependency` search paths for panic runtimes) - #160320 (point at trait definition when it is used as a derive macro) - #160369 (When suggesting method names, prefer *exact* doc aliases over similar names) - #160406 (`DepKind` cleanups) - #160424 (Use `thread::available_parallelism` as the default limit for backend parallelism) - #159014 ([rustdoc] Do not take `doc(cfg())` into account when filtering doctests) - #159303 (Fix ICE for direct inline const generic defaults) - #159977 (Add regression test for bool indexing codegen) - #160165 (reject `...` without pattern post-expansion) - #160295 (Fix rustdoc ICE when checking if a generic arg can be elided) - #160305 (Linkify C-SKY targets in `platform-support.md`) - #160314 (fix borrowck ICE for consts with fn pointer type) - #160322 (ElaborateBoxDeref: remove unnecessary projection) - #160338 (Add regression test for supertrait associated type normalization through dyn) - #160340 (Add regression test for unused_parens on contract clauses) - #160371 (Add doc aliases for transpositions `read_exact_buf` and `read_exact_buf_at`) - #160384 (Add PR body notes for Cargo lock file maintenance)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
Author
|
@bors r- |
Contributor
|
This pull request was unapproved. Auto build was cancelled due to unapproval. Cancelled workflows: |
Contributor
|
💔 Test for 4c5b250 failed: CI. Failed jobs:
|
Contributor
|
PR #159014, which is a member of this rollup, was unapproved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
-Ldependencysearch paths for panic runtimes #160007 (allow-Ldependencysearch paths for panic runtimes)DepKindcleanups #160406 (DepKindcleanups)thread::available_parallelismas the default limit for backend parallelism #160424 (Usethread::available_parallelismas the default limit for backend parallelism)doc(cfg())into account when filtering doctests #159014 ([rustdoc] Do not takedoc(cfg())into account when filtering doctests)...without pattern post-expansion #160165 (reject...without pattern post-expansion)platform-support.md#160305 (Linkify C-SKY targets inplatform-support.md)read_exact_bufandread_exact_buf_at#160371 (Add doc aliases for transpositionsread_exact_bufandread_exact_buf_at)r? @ghost
Create a similar rollup