Skip to content

Rollup of 7 pull requests#159057

Merged
rust-bors[bot] merged 23 commits into
rust-lang:mainfrom
jhpratt:rollup-xkDszvL
Jul 10, 2026
Merged

Rollup of 7 pull requests#159057
rust-bors[bot] merged 23 commits into
rust-lang:mainfrom
jhpratt:rollup-xkDszvL

Conversation

@jhpratt

@jhpratt jhpratt commented Jul 10, 2026

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

Shourya742 and others added 23 commits July 1, 2026 05:02
On platforms where `clang` defines `__int128`.
Since the bootstrap command execution redesign, build_helper no longer has to implement these functions. By moving them to boostrap, we can enrich them with bootstrap-specific information.
…ingjubilee

Support `u128`/`i128` c-variadic arguments

The restriction on `u128` is kind of arbitrary, so let's see what it would take to support it.

r? @ghost
…saethlin

Fix `unaligned_volatile_store` by removing `MemFlags::UNALIGNED`

Fixes rust-lang#158897

There seems to be no reason to have this flag at all, as anything that wants it should just adjust the https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/mir/place/struct.PlaceValue.html#structfield.align instead.

r? codegen
…-param-nesed-case, r=BoxyUwU

Handle nested inline consts in const argument checks

More info here: rust-lang#158375 (comment)

r? @BoxyUwU

cc: @khyperia
…=joboet

[perf] Add explicit `Iterator::count` impl for `ChunkBy`.

Prior to this PR, `.chunk_by(..).count()` constructs were using the default `Iterator::count` implementation for `ChunkBy`, which was based on `Iterator::next()`.

We can do noticeably better by writing a dedicated implementation, as measured [at this real-world call site in `omnibor-rs`](https://github.com/omnibor/omnibor-rs/blob/116c5c2281219dece9da4eddc7d2e2c47e4c81c4/omnibor/src/gitoid/internal.rs#L186).

A local benchmark on my macOS laptop shows that using `omnibor-rs`'s public API to invoke `ArtifactId::sha256()` in a tight loop, with appropriate black-boxing, experiences a 5-7% CPU time win with the dedicated implementation. Of course the benchmark is sensitive to the exact length and contents of the file, hence the 5-7% range. But the 95% confidence interval for the amount of improvement in every benchmark I ran is <1% wide, so I am quite confident this is an improvement.

I also extracted the relevant `omnibor-rs` use of `.chunk_by(..).count()` into a microbenchmark, which shows a 2.1-2.4x throughput improvement (-51.5-57.7% CPU time) with the new implementation. Disassembly of the baseline vs new implementation shows that the optimizer was able to vectorize the new implementation, while the baseline was not vectorized.

**AI disclosure:** The optimization opportunity here was discovered as part of a systematic probe for missed optimizations utilizing both traditional and AI tools. The code here was initially prototyped and vetted by AI tools, followed by additional manual work. I secured approval in advance from the reviewer I pinged. I stand behind the quality of the code I'm submitting, and I vouch it's as good or better compared to if I had written every line by my own hand.
…youxu

Introduce new bootstrap config section for PGO configuration

The handling of PGO profiles in bootstrap was a bit messy, we had CLI flags, but those were hardcoded only for rustc and LLVM, and also a separate `rust.profile-use/profile-generate` options, though I'm not sure if anyone ever used them.

I wanted to generalize this a bit, to allow experimenting with PGO optimizing also other parts of the toolchain (e.g. rustdoc, clippy, cargo). This PR introduces a new `[pgo]` section in the bootstrap config, which allows specifying PGO profiles using the config file, currently for `rustc` and LLVM.

It can be also set through the command-line using e.g. `--set pgo.rustc.use=/tmp/foo`.

Best reviewed commit by commit.

r? @jieyouxu
…youxu

Print step stack trace when bootstrap panics

This should make it easier to debug what has happened, or rather where has bootstrap failed, when a panic occurs.

~~I also want to print the step trace on CI when bootstrap fails, but for that I have to first clean up some things in `build_helper`.~~ Nevermind, I added it to this PR.

Fixes: rust-lang#159022

CC @jyn514

r? @jieyouxu
Print a loud error if the configured LLDB cannot be found

Found in rust-lang#158298.

r? @jieyouxu
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 10, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 10, 2026
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 10, 2026
@jhpratt

jhpratt commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-*

@rust-bors

rust-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7a0188b has been approved by jhpratt

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 10, 2026
@rust-bors

rust-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 7a0188b with merge c7be923

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/29074893113

rust-bors Bot pushed a commit that referenced this pull request Jul 10, 2026
Rollup of 7 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-*
@rust-bors

This comment has been minimized.

@jhpratt

jhpratt commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

Not much lead time on the try jobs.

@bors try cancel

@rust-bors

rust-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 10, 2026
@rust-bors

rust-bors Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: jhpratt
Duration: 3h 28m 56s
Pushing cb014fc to main...

@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#155429 Support u128/i128 c-variadic arguments 031b6c0b393ff72638869b10a0d921b16490eab8 (link)
#158899 Fix unaligned_volatile_store by removing `MemFlags::UNALI… 31183a8517ed171c73bdccd26ac9fe17c9790c96 (link)
#158640 Handle nested inline consts in const argument checks 6ebe1d4a2623ba199fa39fd222d120fbf5df2416 (link)
#158866 [perf] Add explicit Iterator::count impl for ChunkBy. e7ea1ecf7314026170afd5c9dd7bee4937a5294b (link)
#158912 Introduce new bootstrap config section for PGO configuration 1274dc54807ad535280741cff4788e897eb97ee0 (link)
#159040 Print step stack trace when bootstrap panics 63dd6a87ba653b276f0f45f854bd7a081e277d1c (link)
#159056 Print a loud error if the configured LLDB cannot be found fd91b48a93860618f67cd7ef1702f703eb76cf8e (link)

previous master: 3ead112e67

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@github-actions

Copy link
Copy Markdown
Contributor
What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 3ead112 (parent) -> cb014fc (this PR)

Test differences

Show 47 test diffs

Stage 1

  • [assembly] tests/assembly-llvm/c-variadic/aarch64.rs#AARCH64_BE: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/aarch64.rs#AARCH64_DARWIN: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/aarch64.rs#AARCH64_LINUX: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/aarch64.rs#AARCH64_MSVC: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/aarch64.rs#ARM64EC_MSVC: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/gpu.rs#AMDGPU: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/gpu.rs#NVPTX: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/powerpc.rs#AIX: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/powerpc.rs#POWERPC: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/powerpc.rs#POWERPC64: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/powerpc.rs#POWERPC64LE: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/riscv.rs#RISCV32: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/riscv.rs#RISCV64: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/s390x.rs: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/wasm.rs#WASM32: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/wasm.rs#WASM64: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/x86-linux.rs#I686: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/x86-linux.rs#X86_64: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/x86-linux.rs#X86_64_GNUX32: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/x86_64-windows.rs#WINDOWS_GNU: [missing] -> pass (J0)
  • [assembly] tests/assembly-llvm/c-variadic/x86_64-windows.rs#WINDOWS_MSVC: [missing] -> pass (J0)
  • [ui (polonius)] tests/ui/const-generics/mgca/const-param-in-nested-inline-const-arg.rs: [missing] -> pass (J1)
  • [ui] tests/ui/const-generics/mgca/const-param-in-nested-inline-const-arg.rs: [missing] -> pass (J4)

Stage 2

  • [assembly] tests/assembly-llvm/c-variadic/aarch64.rs#AARCH64_BE: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/aarch64.rs#AARCH64_DARWIN: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/aarch64.rs#AARCH64_LINUX: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/aarch64.rs#AARCH64_MSVC: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/aarch64.rs#ARM64EC_MSVC: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/gpu.rs#AMDGPU: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/gpu.rs#NVPTX: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/powerpc.rs#AIX: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/powerpc.rs#POWERPC: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/powerpc.rs#POWERPC64: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/powerpc.rs#POWERPC64LE: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/riscv.rs#RISCV32: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/riscv.rs#RISCV64: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/s390x.rs: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/wasm.rs#WASM32: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/wasm.rs#WASM64: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/x86-linux.rs#I686: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/x86-linux.rs#X86_64: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/x86-linux.rs#X86_64_GNUX32: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/x86_64-windows.rs#WINDOWS_GNU: [missing] -> pass (J2)
  • [assembly] tests/assembly-llvm/c-variadic/x86_64-windows.rs#WINDOWS_MSVC: [missing] -> pass (J2)
  • [ui] tests/ui/const-generics/mgca/const-param-in-nested-inline-const-arg.rs: [missing] -> pass (J3)

Additionally, 2 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard cb014fcb149e44d8aa16a8f66c9f2b1762f034f8 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-mingw-1: 1h 47m -> 2h 41m (+51.2%)
  2. x86_64-mingw-2: 2h 37m -> 1h 31m (-42.1%)
  3. x86_64-gnu-gcc-core-tests: 15m 46s -> 9m 15s (-41.3%)
  4. x86_64-gnu-llvm-22-2: 1h 16m -> 1h 40m (+31.3%)
  5. x86_64-gnu-llvm-21-3: 1h 29m -> 1h 53m (+27.3%)
  6. x86_64-rust-for-linux: 49m 33s -> 36m 25s (-26.5%)
  7. aarch64-apple-macos-26: 2h 41m -> 3h 22m (+25.8%)
  8. x86_64-gnu-stable: 1h 54m -> 2h 23m (+25.6%)
  9. i686-msvc-1: 2h 15m -> 2h 49m (+24.8%)
  10. dist-android: 27m 21s -> 22m 44s (-16.8%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (cb014fc): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

Results (secondary 4.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.5% [2.3%, 6.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.1%, secondary -0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.1% [-0.1%, -0.0%] 26
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 21
All ❌✅ (primary) -0.1% [-0.1%, -0.0%] 26

Bootstrap: 490.513s -> 490.017s (-0.10%)
Artifact size: 389.99 MiB -> 389.92 MiB (-0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants