Skip to content

Rustup to rustc 1.97.0-nightly (e95e73209 2026-05-05)#884

Merged
antoyo merged 15 commits intorust-lang:masterfrom
bjorn3:rustup
May 6, 2026
Merged

Rustup to rustc 1.97.0-nightly (e95e73209 2026-05-05)#884
antoyo merged 15 commits intorust-lang:masterfrom
bjorn3:rustup

Conversation

@bjorn3
Copy link
Copy Markdown
Member

@bjorn3 bjorn3 commented May 6, 2026

There were a bunch of merge conflicts I had to resolve manually.

hoodmane and others added 14 commits April 28, 2026 09:56
Previously this was not correctly implemented. Each funclet may need its own terminate
block, so this changes the `terminate_block` into a `terminate_blocks` `IndexVec` which
can have a terminate_block for each funclet. We key on the first basic block of the
funclet -- in particular, this is the start block for the old case of the top level
terminate function.

Rather than using a catchswitch/catchpad pair, I used a cleanuppad. The reason for the
pair is to avoid catching foreign exceptions on MSVC. On wasm, it seems that the
catchswitch/catchpad pair is optimized back into a single cleanuppad and a catch_all
instruction is emitted which will catch foreign exceptions. Because the new logic is
only used on wasm, it seemed better to take the simpler approach seeing as they do the
same thing.
…29, r=antoyo

GCC backend subtree sync

r? ghost
This is necessary to fix incremental LTO in cg_gcc as well as to do some
LTO refactorings I want to do. The actual fix for cg_gcc will be done on
the cg_gcc repo to test it in CI.
`rustc_error_messages` currently depends on
`rustc_ast`/`rustc_ast_pretty`. This is odd, because
`rustc_error_messages` feels like a very low-level module but
`rustc_ast`/`rustc_ast_pretty` do not.

The reason is that a few AST types impl `IntoDiagArg` via
pretty-printing. `rustc_error_messages` can define `IntoDiagArg` and
then impl it for the AST types. But if we invert the dependency we hit
a problem with the orphan rule: `rustc_ast` must impl `IntoDiagArg`
for the AST types, but that requires calling pretty-printing code which
is in `rustc_ast_pretty`, a downstream crate.

This commit avoids this problem by just removing the `IntoDiagArg` impls
for these AST types. There aren't that many of them, and we can just use
`String` in the relevant error structs and use the pretty printer in the
downstream crates that construct the error structs. There are plenty of
existing examples where `String` is used in error structs.

There is now no dependency between `rustc_ast*` and
`rustc_error_messages`.
…orn3

Fix: On wasm targets, call `panic_in_cleanup` if panic occurs in cleanup

Relies on rust-lang/llvm-project#194.
Reland of rust-lang/rust#151771.

Previously this was not correctly implemented. Each funclet may need its own terminate block, so this changes the `terminate_block` into a `terminate_blocks` `IndexVec` which can have a terminate_block for each funclet. We key on the first basic block of the funclet -- in particular, this is the start block for the old case of the top level terminate function.

Rather than using a catchswitch/catchpad pair, I used a cleanuppad. The reason for the pair is to avoid catching foreign exceptions on MSVC. On wasm, it seems that the catchswitch/catchpad pair is optimized back into a single cleanuppad and a catch_all instruction is emitted which will catch foreign exceptions. Because the new logic is only used on wasm, it seemed better to take the simpler approach seeing as they do the same thing.

- [ ] Add test for rust-lang/rust#153948
Pass Session to optimize_and_codegen_fat_lto

This is necessary to fix incremental LTO in cg_gcc as well as to do some LTO refactorings I want to do. The actual fix for cg_gcc will be done on the cg_gcc repo to test it in CI.
Add rlib digest to identify Rust object files



This adds a metadata entry to `rlib` archives that lists which members are Rust object files instead of relying on the filename heuristic in `looks_like_rust_object.file`. I also added a fallback to the old behavior for `rlibs` built by older compilers. 

Part of rust-lang/rust#138243.
@bjorn3
Copy link
Copy Markdown
Member Author

bjorn3 commented May 6, 2026

CI passed.

@antoyo antoyo merged commit b5a73af into rust-lang:master May 6, 2026
38 checks passed
@antoyo
Copy link
Copy Markdown
Contributor

antoyo commented May 6, 2026

Thanks for your contribution!

@bjorn3 bjorn3 deleted the rustup branch May 6, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants