Skip to content

Rustc pull update - #1246

Merged
tgross35 merged 13 commits into
mainfrom
rustc-pull
Aug 7, 2026
Merged

Rustc pull update#1246
tgross35 merged 13 commits into
mainfrom
rustc-pull

Conversation

@workflows-compiler-builtins

Copy link
Copy Markdown

Latest update from rustc.

bors and others added 12 commits June 29, 2026 09:55
…lmann

lint ImproperCTypes: refactor linting architecture (part 3)



This is the third PR in an effort to split rust-lang/rust#134697 (refactor plus overhaul of the ImproperCTypes family of lints) into individually-mergeable parts.

Contains:
- the changes of the first two PRs
- other user-invisible changes,
- the prevention of stack overflows while checking irregular recursive types.

Fixes: rust-lang/rust#130310
Superset of: rust-lang/rust#146271 and its superset rust-lang/rust#146273
…nkov

resolve: Explicit Set for detecting resolution cycles



Instead of using the `borrow_mut` counter of a `RefCell` for a `NameResolution` for detecting cyclic imports during import resolution, we use an explicit recursion stack that keeps track of the current used `NameResolution`s.

Because of the upcoming parallelisation of the import resolution algorithm, the current way cannot used in a parallel context.


r? @petrochenkov
Polish some macro parsing code



I'm working on some optimizations to `macro_parser.rs` and the surrounding code (specifically, changing the current BFS approach into a DFS), and these changes fell out during that effort. I think they make the code more accessible in addition to laying some foundations for my future work (in particular, the handling of ambiguities).

This is my first proper entrance into rustc code, please let me know if I'm holding something wrong :)

The commits are organized and individually reviewable.

r? @nnethercote
bootstrap: update cc-rs to `1.2.62`



* Removes deprecated `static_flag` build methods
These are used for unaligned accesses since LLVM 23.
Update to LLVM 23



Changes in this PR (apart from the LLVM update):
 * Updated cov-map tests due to minor ordering changes introduced in llvm/llvm-project@5931034. The affected tests are limited to LLVM >= 23 now.
 * Set `LLVM_VERSIONED_DYLIB_NAME_ON_DARWIN=OFF`, which restores the previous unversioned naming of the LLVM dylib on Darwin. I expect we'll want to change this for consistency with Linux, but given the amount of trouble Darwin dylibs have caused in the past, I'm not trying to do it in this PR.
 * Distribute the llvm-project/libc subproject, which is now a build dependency of LLVM.
 * Pull in f128 Windows ABI changes from rust-lang/rust#158778. These need to land in sync with the LLVM update (as ABI of libcalls is controlled by LLVM, not our ABI lowering).
 * Disable RISCV backend on dist-i686-mingw, because the build OOMs on a large generated file. This is a temporary measure until host tools are removed by rust-lang/compiler-team#1020.
 * The llvm-project fork includes a new downstream patch for mingw: rust-lang/llvm-project@b89cd8e It works around mingw having broken TLS prior to GCC 16. (We're currently on GCC 14.)

Issues:
* [x] llvm/llvm-project#209512
* [x] llvm/llvm-project#209714
* [x] llvm/llvm-project#209718
* [x] rust-lang/stdarch#2190 (synced in rust-lang/rust#159517)
* [x] llvm/llvm-project#210025
* [x] rust-lang/rust#159391
* [x] EnzymeAD/Enzyme#2951
* [x] rust-lang/rust#159301
* [x] llvm/llvm-project#210300
Type fallback refactorings





- Don't merge different kinds of infer variables into `Ty` before matching them back
- Do fallback only on root vars (this is semantically equivalent to what we currently do; unifying any of the infer vars from the same equivalence class necesserily affects all of them) (this makes rust-lang/rust#159003 a bit less hacky though)
- Do some simplification that has been allowed by the previous changes

cc @lcnr
Enable polonius alpha on nightly



 See [rust-lang/compiler-team#](rust-lang/compiler-team#1015)

The first commit here adds an `-Zpolonius=nll` argument for tests and so people can disable alpha on nightly.
…enkov

perf: Lock-free root fast paths for hygiene queries

`normalize_to_macros_2_0`, `normalize_to_macro_rules` and `outer_expn_is_descendant_of` take the `HygieneData` lock even for the root syntax context, the common case, where the answer is fixed: the root normalizes to itself, and everything descends from the root expansion. This PR avoids the lock, like the existing fast paths in `ExpnId::is_descendant_of`.
This updates the rust-version file to f73951df0a5566d94d13b7954acd9f4ab1fa3734.
Needed for the `__aeabi_u{read,write}*` symbols that we now require.
@tgross35

tgross35 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Looks like the new asm files enable the executable stack:

+ cargo run -p symbol-check --release -- --build-and-check --target arm-unknown-linux-gnueabi -- --package compiler_builtins --features compiler-builtins --features c
    success: no writeable+executable stack indicators found
    success: no visible symbols found
    Finished `release` profile [optimized] target(s) in 0.04s
     Running `/builtins-target/release/symbol-check --build-and-check --target arm-unknown-linux-gnueabi -- --package compiler_builtins --features compiler-builtins --features c`
running: "rustc" "--target" "arm-unknown-linux-gnueabi" "--print=cfg"
running: "cargo" "build" "--target" "arm-unknown-linux-gnueabi" "--message-format=json-diagnostic-rendered-ansi" "--package" "compiler_builtins" "--features" "compiler-builtins" "--features" "c"
   Compiling compiler_builtins v0.1.160 (/checkout/builtins-shim)
build script output: {
  "cfgs": [
    "intrinsics_enabled",
    "f16_enabled",
    "f128_enabled",
    "__absvdi2=\"optimized-c\"",
    "__absvsi2=\"optimized-c\"",
    "__absvti2=\"optimized-c\"",
    "__addvdi3=\"optimized-c\"",
    "__addvsi3=\"optimized-c\"",
    "__addvti3=\"optimized-c\"",
    "__aeabi_cdcmp=\"optimized-c\"",
    "__aeabi_cdcmpeq_check_nan=\"optimized-c\"",
    "__aeabi_cfcmp=\"optimized-c\"",
    "__aeabi_cfcmpeq_check_nan=\"optimized-c\"",
    "__aeabi_div0=\"optimized-c\"",
    "__aeabi_drsub=\"optimized-c\"",
    "__aeabi_frsub=\"optimized-c\"",
    "__aeabi_uread4=\"optimized-c\"",
    "__aeabi_uread8=\"optimized-c\"",
    "__aeabi_uwrite4=\"optimized-c\"",
    "__aeabi_uwrite8=\"optimized-c\"",
    "__bswapdi2=\"optimized-c\"",
    "__bswapsi2=\"optimized-c\"",
    "__cmpdi2=\"optimized-c\"",
    "__cmpti2=\"optimized-c\"",
    "__divdc3=\"optimized-c\"",
    "__divmodsi4=\"optimized-c\"",
    "__divsc3=\"optimized-c\"",
    "__divsi3=\"optimized-c\"",
    "__ffsti2=\"optimized-c\"",
    "__int_util=\"optimized-c\"",
    "__modsi3=\"optimized-c\"",
    "__muldc3=\"optimized-c\"",
    "__mulsc3=\"optimized-c\"",
    "__mulvdi3=\"optimized-c\"",
    "__mulvsi3=\"optimized-c\"",
    "__mulvti3=\"optimized-c\"",
    "__negdf2=\"optimized-c\"",
    "__negdi2=\"optimized-c\"",
    "__negsf2=\"optimized-c\"",
    "__negti2=\"optimized-c\"",
    "__negvdi2=\"optimized-c\"",
    "__negvsi2=\"optimized-c\"",
    "__negvti2=\"optimized-c\"",
    "__paritydi2=\"optimized-c\"",
    "__paritysi2=\"optimized-c\"",
    "__parityti2=\"optimized-c\"",
    "__popcountdi2=\"optimized-c\"",
    "__popcountsi2=\"optimized-c\"",
    "__popcountti2=\"optimized-c\"",
    "__subvdi3=\"optimized-c\"",
    "__subvsi3=\"optimized-c\"",
    "__subvti3=\"optimized-c\"",
    "__switch16=\"optimized-c\"",
    "__switch32=\"optimized-c\"",
    "__switch8=\"optimized-c\"",
    "__switchu8=\"optimized-c\"",
    "__sync_synchronize=\"optimized-c\"",
    "__ucmpdi2=\"optimized-c\"",
    "__ucmpti2=\"optimized-c\"",
    "__udivmodsi4=\"optimized-c\"",
    "__udivsi3=\"optimized-c\"",
    "__umodsi3=\"optimized-c\""
  ],
  "env": [],
  "linked_libs": [
    "static=compiler-rt"
  ],
  "linked_paths": [
    "native=/builtins-target/arm-unknown-linux-gnueabi/debug/build/compiler_builtins/2d5eff330f865889/out"
  ],
  "out_dir": "/builtins-target/arm-unknown-linux-gnueabi/debug/build/compiler_builtins/2d5eff330f865889/out",
  "package_id": "path+file:///checkout/builtins-shim#compiler_builtins@0.1.160",
  "reason": "build-script-executed"
}
warning: compiler_builtins@0.1.160: feature `arch` enabled
warning: compiler_builtins@0.1.160: feature `c` enabled
warning: compiler_builtins@0.1.160: feature `compiler-builtins` enabled
warning: compiler_builtins@0.1.160: feature `default` enabled
warning: compiler_builtins@0.1.160: feature `unmangled-names` enabled
warning: compiler_builtins@0.1.160: setting config `intrinsics_enabled`
warning: compiler_builtins@0.1.160: setting config `f16_enabled`
warning: compiler_builtins@0.1.160: setting config `f128_enabled`
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.19s
build finshed. success: true
Collected the following rlibs to check: [
    "/builtins-target/arm-unknown-linux-gnueabi/debug/libcompiler_builtins.rlib",
]
Checking /builtins-target/arm-unknown-linux-gnueabi/debug/libcompiler_builtins.rlib
    success: no duplicate symbols found
    success: no undefined references to core found
    success: object files match target
the following object files require an executable stack:
    1f2a8e363989146d-aeabi_uread4.o (no .note.GNU-stack section)
    1f2a8e363989146d-aeabi_uread8.o (no .note.GNU-stack section)
    1f2a8e363989146d-aeabi_uwrite4.o (no .note.GNU-stack section)
    1f2a8e363989146d-aeabi_uwrite8.o (no .note.GNU-stack section)

Pull in a patch that landed just recently but hasn't yet been
backported. Without it, symcheck fails.

Link: llvm/llvm-project#214465
@tgross35
tgross35 merged commit 4feca6f into main Aug 7, 2026
86 of 87 checks passed
@tgross35
tgross35 deleted the rustc-pull branch August 7, 2026 08:44
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.

3 participants