Skip to content

Rollup of 5 pull requests #142253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jun 9, 2025
Merged

Rollup of 5 pull requests #142253

merged 14 commits into from
Jun 9, 2025

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Jun 9, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

hkBst and others added 14 commits June 7, 2025 11:40
Many of `std`'s dependency have a dependency on the crates.io
`compiler-builtins` when used with the feature
`rustc-std-workspace-core`. Use a Cargo patch to select the in-tree
version instead.

`compiler-builtins` is also added as a dependency of
`rustc-std-workspace-core` so these crates can remove their crates.io
dependency in the future.
There are a few places that violate this lint, which showed up in
rust-lang/rust CI (the relevent module is gated behind
`kernel_user_helpers` which is only set for `armv4t`, `armv5te`, and
`arm-linux-androideabi`; none of these are tested in compiler-builtins
CI). Add new `unsafe { /* ... */ }` blocks where needed to address this.

Some blocks should get a more thorough review of their preconditions, so
their safety comments are left as `FIXME`s.
On the ILP32 `x86_64-unknown-linux-gnux32` target, `usize` is 32 bits so
there is a sub-register alignment warning. Specify the 64-bit `r`
registers, which matches the current default as well as the size of the
other operands in the routines.
The `build.rs` entrypoint returns early for some targets, so emscripten
and OpenBSD were not getting check-cfg set. Emit these earlier to avoid
the `unexpected_cfgs` lint.
…cross,tgross35

Stabilize `sha512`, `sm3` and `sm4` for x86

This PR stabilizes the feature flag `sha512_sm_x86` (tracking issue rust-lang#126624).

# Public API
The 3 `x86` target features `sha512`, `sm3` and `sm4`, and the associated intrinsics in stdarch.

These target features are very specialized, and are only used to signal the presence of the corresponding CPU instruction. They don't have any nontrivial interaction with the ABI (contrary to something like AVX), and serve the only purpose of enabling 10 stdarch intrinsics, all of which have been implemented and propagated to rustc via a stdarch submodule update.

Also, these were added in LLVM17, and as the minimum LLVM required for rustc is LLVM19, we are safe in that front too!

# Associated PRs
 - rust-lang#126704
 - rust-lang/stdarch#1592
 - rust-lang/stdarch#1790
 - rust-lang#140389 (stdarch submodule update)
 - rust-lang/stdarch#1796 (stabilizing the runtime detection and intrinsics)
 - rust-lang#141964 (stdarch submodule update for the stabilization of the runtime detection and intrinsics)

As all of the required tasks have been done (adding the target features to rustc, implementing their runtime detection in std_detect and implementing the associated intrinsics in core_arch), these target features can be stabilized now.

cc `@rust-lang/lang`
cc `@rust-lang/libs-api` for the intrinsics and runtime detection

I don't think anyone else worked on this feature, so no one else to ping, maybe cc `@Amanieu.` I will send the reference pr soon.
Make NonZero<char> possible

I'd like to use `NonZero<char>` for representing units of CStr in https://github.com/rust-lang/literal-escaper
…jorn3

Use the in-tree `compiler-builtins` for the sysroot

Many of `std`'s dependency have a dependency on the crates.io `compiler-builtins` when used with the feature `rustc-std-workspace-core`. Use a Cargo patch to select the in-tree version instead.

`compiler-builtins` is also added as a dependency of `rustc-std-workspace-core` so these crates can remove their crates.io dependency in the future.

Zulip discussion: [#t-compiler > Using in-tree compiler-builtins](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Using.20in-tree.20compiler-builtins/with/522445336)

Once this merges, the following PRs will need to make it to a release for the relevant crates:

- rust-lang/getopts#119 (can merge at any time)
- rust-lang/hashbrown#625 (can merge at any time)
- rust-lang/stdarch#1825
- rust-lang/rustc-demangle#80
- rust-lang/cfg-if#84
- unicode-rs/unicode-width#77

The above should cover all tier 1 targets with no `std` features enabled. The remaining cover the rest:

- alexcrichton/dlmalloc-rs#50 (wasm, xous, sgx)
- gimli-rs/gimli#769
- r-efi/r-efi#89 (efi)
- r-efi/r-efi-alloc#9 (efi)
- fortanix/rust-sgx#770 (sgx)
- hermit-os/hermit-rs#718 (hermit)
- bytecodealliance/wasi-rs#108 (wasi)
- gimli-rs/addr2line#345
- oyvindln/adler2#2
- BurntSushi/memchr#180
- Frommi/miniz_oxide#173
- gimli-rs/object#777

try-job: x86_64-gnu
try-job: test-various
…nkov

Always consider `const _` items as live for dead code analysis

This PR alters dead code analysis to always consider `const _: () = { ... };` to be live.

This doesn't address the `_name` pattern from rust-lang#142075.

Fixes rust-lang#142104
…kingjubilee

stabilize nonnull_provenance

Fixes rust-lang#135243
FCP passed in rust-lang#135243
@rustbot rustbot added A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler 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. rollup A PR which is a rollup labels Jun 9, 2025
@tgross35
Copy link
Contributor Author

tgross35 commented Jun 9, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jun 9, 2025

📌 Commit fd06f6d has been approved by tgross35

It is now in the queue for this repository.

@bors bors 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 Jun 9, 2025
@bors
Copy link
Collaborator

bors commented Jun 9, 2025

⌛ Testing commit fd06f6d with merge d13a431...

@bors
Copy link
Collaborator

bors commented Jun 9, 2025

☀️ Test successful - checks-actions
Approved by: tgross35
Pushing d13a431 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 9, 2025
@bors bors merged commit d13a431 into rust-lang:master Jun 9, 2025
11 checks passed
@rustbot rustbot added this to the 1.89.0 milestone Jun 9, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#140767 Stabilize sha512, sm3 and sm4 for x86 ccacf137dd1947623e3905a96ba28cc61a0f10a0 (link)
#141001 Make NonZero possible f0e7c7580287a829f3ad6d172f2dd2372c0688c6 (link)
#141993 Use the in-tree compiler-builtins for the sysroot f892ea6c313ec465b9585aa05ece515cbd8952de (link)
#142208 Always consider const _ items as live for dead code analy… ca7b3ba85be9548f60068f585325def9860e871c (link)
#142238 stabilize nonnull_provenance df121b6f3dcbb0990e9cbcdf01b992ca8d6b4df4 (link)

previous master: 00b526212b

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

Copy link
Contributor

github-actions bot commented Jun 9, 2025

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 00b5262 (parent) -> d13a431 (this PR)

Test differences

Show 903 test diffs

Stage 1

  • num::niche_types::test_new_from_extreme_is_some: [missing] -> pass (J0)
  • num::niche_types::test_new_from_zero_is_none: [missing] -> pass (J0)
  • [ui] tests/ui/feature-gates/feature-gate-sha512_sm_x86.rs: pass -> [missing] (J4)
  • [ui] tests/ui/lint/dead-code/const-underscore-issue-142104.rs: [missing] -> pass (J4)

Stage 2

  • [ui] tests/ui/feature-gates/feature-gate-sha512_sm_x86.rs: pass -> [missing] (J1)
  • [ui] tests/ui/feature-gates/feature-gate-sha512_sm_x86.rs: ignore (only executed when the architecture is x86_64) -> [missing] (J2)
  • [ui] tests/ui/lint/dead-code/const-underscore-issue-142104.rs: [missing] -> pass (J3)

Additionally, 896 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 d13a431a6cc69cd65efe7c3eb7808251d6fd7a46 --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-apple-2: 4123.8s -> 5966.9s (44.7%)
  2. dist-apple-various: 7740.9s -> 6087.9s (-21.4%)
  3. x86_64-rust-for-linux: 2479.3s -> 2958.8s (19.3%)
  4. mingw-check-1: 1627.2s -> 1880.5s (15.6%)
  5. mingw-check-2: 1957.8s -> 2222.6s (13.5%)
  6. i686-gnu-2: 5440.1s -> 6163.5s (13.3%)
  7. dist-arm-linux-musl: 5381.9s -> 5964.7s (10.8%)
  8. arm-android: 5394.4s -> 5947.6s (10.3%)
  9. i686-gnu-nopt-1: 7434.1s -> 8182.9s (10.1%)
  10. aarch64-gnu-debug: 3612.6s -> 3970.8s (9.9%)
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-run-make Area: port run-make Makefiles to rmake.rs merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants