Skip to content

Rollup of 7 pull requests #142081

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 46 commits into from
Jun 5, 2025
Merged

Rollup of 7 pull requests #142081

merged 46 commits into from
Jun 5, 2025

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jun 5, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

beetrees and others added 30 commits May 21, 2025 19:24
These were deleted during refactoring in 0a2dc5d9 ("Combine the source
files for more generic implementations") but got added back by accident
in 54bac411 ("refactor: Move the libm crate to a subdirectory"). Remove
them again here.
As seen at [1], LLVM uses `long long` on LLP64 (to get a 64-bit integer
matching pointer size) and `long` on everything else, with exceptions
for AArch64 and AVR. Our current logic always uses an `i32`. This
happens to work because LLVM uses 32-bit instructions to check the
output on x86-64, but the GCC checks the full 64-bit register so garbage
in the upper half leads to incorrect results.

Update our return type to be `isize`, with exceptions for AArch64 and
AVR.

Fixes: rust-lang/compiler-builtins#919

[1]: https://github.com/llvm/llvm-project/blob/0cf3c437c18ed27d9663d87804a9a15ff6874af2/compiler-rt/lib/builtins/fp_compare_impl.inc#L11-L27
Link to Apache License changed from htps:// to https://
Since the two crates are now in the same repo, it is easier to share
code. Begin some deduplication with the integer traits.
These are now provided by `compiler-builtins`, so there is no need to
also build the C versions. This was detected by checking for duplicate
symbols and not excluding weak symbols (like CI currently does).
This should be less error-prone and adaptable than the `nm` version, and
have better cross-platform support without needing LLVM `nm` installed.
Since a working `nm` is no longer needed as part of CI, the rustup
component can be removed.
Do the same for `builtins-test-intrinsics`. Mostly this means updating
`extern` to `unsafe extern`, and fixing a few new Clippy lints.
As part of this, the u256 benchmarks are reorganized to a group.
Currently we only build this, but it is possible to run the binary.
Change the CI script to do so here.
When multiple merges to `master` happen before a CI run completes, the
in-progress job is getting canceled. Fix this by using the commit sha
for the group key if a pull request number is not available, rather than
`github.ref` (which is always `refs/head/master` after merge). This
should prevent jobs running on previous commits from getting cancelled,
while still ensuring there is only ever one active run per pull request.
We may soon want to use some new nightly features in `compiler-builtins`
and `libm`, specifically `cfg_target_has_reliable_f16_f128` which was
added in the past few weeks. This will mean we need a newer toolchain
for benchmarks to continue building.

Bump to the current latest nightly so we are not blocked on this down
the line.
Currently we run logspace tests for extensive tests, but there isn't any
reason we couldn't also run more kinds of tests more extensively (e.g.
more edge cases, combine edge cases with logspace for multi-input
functions, etc). As a first step toward making this possible, make
`extensive` a new field in `CheckCtx`, and rename `QuickSpaced` to
`Spaced`.
We don't actually need this for now, but eventually it would be nice to
run icount benchmarks on multiple targets. Start tagging artifact names
with the architecture, and allow passing `--tag` to `ci-util.py` in
order to retrieve the correct one.
In particular, this includes a fix to `iai-callgrind` that will allow us
to simplify our benchmark runner.
iai-callgrind now correctly exits with error if regressions were found
[1], so we no longer need to check for regressions manually. Remove this
check and instead exit based on the exit status of the benchmark run.

[1] iai-callgrind/iai-callgrind#337
`binop_common` emits a `SKIP` that is intended to apply only to
`copysign`, but is instead applying to all binary operators. Correct the
general case but leave the currently-failing `maximum_num` tests as a
FIXME, to be resolved separately in [1].

Also simplify skip logic and NaN checking, and add a few more `copysign`
checks.

[1]: rust-lang/compiler-builtins#939
Before this commit, serde_derive is built before serde. But serde does
not depend on serde_derive, so that is not needed. Instead, build serde
and serde_derive in parallel.

This speeds up compilation for users depending on rustdoc-json-types out
of tree.

Imports: https://www.github.com/rust-lang/rustdoc-types/pull/49
Co-authored-by: Martin Nordholts <[email protected]>
tgross35 and others added 9 commits June 4, 2025 21:27
This was introduced before `#[panic_handler]` was stable, but should no
longer be needed. Additionally, we only need it for
`builtins-test-intrinsics`, not as a dependency of `compiler-builtins`.
…illaumeGomez

jsondocck: Refactor directive handling

Best reviewed commit by commit.

1. Moves directive handling into its own file. This makes it easier to link to in the dev-guide (rust-lang/rustc-dev-guide#2422 (comment)), but also makes the code nicer in it's own right
2. Renames command to directive. This is what compiletest uses, and it's nice to not have 2 words for this.

r? ``@GuillaumeGomez``
`tests/ui`: A New Order [4/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

r? ``@jieyouxu``

added stderr tag for commit which means it included generated stderr
…umeGomez

rustdoc-json-type: Depend on `serde` and `serde_derive` seperately

Before this commit, serde_derive is built before serde. But serde does not depend on serde_derive, so that is not needed. Instead, build serde and serde_derive in parallel.

This speeds up compilation for users depending on rustdoc-json-types out of tree.

Imports: rust-lang/rustdoc-types#49

CC ``@Enselic``

r? ``@GuillaumeGomez``
Report the actual item that evaluation failed for

instead of id of the last frame in the evaluation stack

r? ``@RalfJung``

fixes rust-lang#142010
bootstrap: Fix file permissions when dereferencing symlinks

## Problem
When copying files in the bootstrap process with `dereference_symlinks = true`, we're incorrectly using the symlink's metadata to set permissions on the copied regular file, which results in the following error:
```
Warning: Failed to set file times for "/build/nix-build-rustc-1.86.0.drv-0/rustc-1.86.0-src/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-strip" (permissions: Permissions(FilePermissions { mode: 0o100000 (----------) })) error: Permission denied (os error 13)
```

Verbose Logs confirming the error:
```
TRACE: Found llvm-strip copy operation
  Source: /n/nix/tech/store/n34yzv2n50p6lbjmx089vjym121wbl4j-llvm-19.1.7/bin/llvm-strip
  Destination: /build/nix-build-rustc-1.86.0.drv-0/rustc-1.86.0-src/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-strip
  Source is_symlink (via symlink_metadata): true
  Source symlink_metadata permissions: 120000
  Source symlink_metadata file_type: FileType { is_file: false, is_dir: false, is_symlink: true, .. }

  Source is symlink pointing to: llvm-objcopy
  Source raw mode: 120000
  Source filetype: 120000

  Setting permissions: Permissions(FilePermissions { mode: 0o120000 (l---------) })
  Permission mode to set: 120000
  Raw permission bits: 120000
  File type bits being set: 120000
  Permission bits being set: 0

  WARNING: Attempting to set symlink file type (120000) on regular file!
  WARNING: Setting zero permission bits will make file inaccessible!
  Destination permissions after set_permissions: 100000
```

## Solution
After canonicalizing a symlink path, fetch the metadata of the target file instead of continuing to use the symlink's metadata. This ensures:
- Correct file type detection
- Proper permission bits for the target file
- Maintains existing behavior for non-symlink cases

## Testing
Verified fix resolves permission errors:
```
rustc> llvm-strip: Original metadata mode: 120000, is_symlink: true
rustc> llvm-strip: Target metadata mode after fix: 100555
rustc> llvm-strip: Final permissions mode: 100555
```
…r=fee1-dead

Fix parsing of frontmatters with inner hyphens

closes rust-lang#141483

r? fee1-dead
Update the `compiler-builtins` subtree

Update the Josh subtree to rust-lang/compiler-builtins@5c3d8f2753b8.

r? ``@ghost``
@rustbot rustbot added A-compiler-builtins Area: compiler-builtins (https://github.com/rust-lang/compiler-builtins) A-rustdoc-json Area: Rustdoc JSON backend 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) T-compiler Relevant to the compiler 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. rollup A PR which is a rollup labels Jun 5, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jun 5, 2025

📌 Commit 9a9e160 has been approved by matthiaskrgr

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

bors commented Jun 5, 2025

⌛ Testing commit 9a9e160 with merge 076ec59...

@bors
Copy link
Collaborator

bors commented Jun 5, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 076ec59 to master...

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#141709 jsondocck: Refactor directive handling b631f0ab4a931979c59a6048596ef554791c8444 (link)
#141974 tests/ui: A New Order [4/N] ac1f6657e7753e4f4e79813cbc484841604eea51 (link)
#141989 rustdoc-json-type: Depend on serde and serde_derive sep… c6ed6518930964db04f0e625be13a81823b006d2 (link)
#142015 Report the actual item that evaluation failed for ab3ccbec3df7efdce5defa60dff41a3a91a32c1e (link)
#142026 bootstrap: Fix file permissions when dereferencing symlinks 7617b752c18a850858c70e7327e0a92fccb694c5 (link)
#142032 Fix parsing of frontmatters with inner hyphens 1e5fabb028048281365ba58a7170aeb28fc77b42 (link)
#142036 Update the compiler-builtins subtree 70ce7ed93b933003f376804f4d0550cbc1614d10 (link)

previous master: 0b20963d6b

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 5, 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 0b20963 (parent) -> 076ec59 (this PR)

Test differences

Show 22 test diffs

Stage 1

  • [ui] tests/ui/cenum_impl_drop_cast.rs: pass -> [missing] (J0)
  • [ui] tests/ui/char.rs: pass -> [missing] (J0)
  • [ui] tests/ui/class-cast-to-trait.rs: pass -> [missing] (J0)
  • [ui] tests/ui/class-method-missing.rs: pass -> [missing] (J0)
  • [ui] tests/ui/cleanup-rvalue-for-scope.rs: pass -> [missing] (J0)
  • [ui] tests/ui/drop/for-expr-temporary-drop-scope.rs: [missing] -> pass (J0)
  • [ui] tests/ui/enum/enum-drop-cast-error.rs: [missing] -> pass (J0)
  • [ui] tests/ui/frontmatter/frontmatter-inner-hyphens-1.rs: [missing] -> pass (J0)
  • [ui] tests/ui/frontmatter/frontmatter-inner-hyphens-2.rs: [missing] -> pass (J0)
  • [ui] tests/ui/privacy/trait-object-method-error.rs: [missing] -> pass (J0)
  • [ui] tests/ui/traits/trait-impl-missing-method.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/cenum_impl_drop_cast.rs: pass -> [missing] (J1)
  • [ui] tests/ui/char.rs: pass -> [missing] (J1)
  • [ui] tests/ui/class-cast-to-trait.rs: pass -> [missing] (J1)
  • [ui] tests/ui/class-method-missing.rs: pass -> [missing] (J1)
  • [ui] tests/ui/cleanup-rvalue-for-scope.rs: pass -> [missing] (J1)
  • [ui] tests/ui/drop/for-expr-temporary-drop-scope.rs: [missing] -> pass (J1)
  • [ui] tests/ui/enum/enum-drop-cast-error.rs: [missing] -> pass (J1)
  • [ui] tests/ui/frontmatter/frontmatter-inner-hyphens-1.rs: [missing] -> pass (J1)
  • [ui] tests/ui/frontmatter/frontmatter-inner-hyphens-2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/privacy/trait-object-method-error.rs: [missing] -> pass (J1)
  • [ui] tests/ui/traits/trait-impl-missing-method.rs: [missing] -> pass (J1)

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 076ec59ff1dcf538b9d3a0b8e0d7f4edd0559959 --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-rust-for-linux: 2015.5s -> 2935.7s (45.7%)
  2. x86_64-apple-2: 3962.7s -> 5422.9s (36.8%)
  3. armhf-gnu: 3912.5s -> 4978.7s (27.3%)
  4. mingw-check-1: 1597.6s -> 1995.4s (24.9%)
  5. arm-android: 4796.7s -> 5936.7s (23.8%)
  6. test-various: 3643.2s -> 4403.3s (20.9%)
  7. x86_64-gnu-tools: 5164.4s -> 6220.5s (20.4%)
  8. x86_64-gnu: 5920.5s -> 7059.2s (19.2%)
  9. x86_64-gnu-nopt: 5053.2s -> 5903.4s (16.8%)
  10. x86_64-gnu-aux: 5506.5s -> 6380.0s (15.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.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (076ec59): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 1.2%, secondary -1.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.2% [1.2%, 1.2%] 1
Regressions ❌
(secondary)
1.3% [1.3%, 1.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.3% [-4.3%, -4.3%] 1
All ❌✅ (primary) 1.2% [1.2%, 1.2%] 1

Cycles

Results (primary 1.6%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.6% [1.4%, 1.9%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.6% [1.4%, 1.9%] 3

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 750.971s -> 750.189s (-0.10%)
Artifact size: 371.78 MiB -> 371.75 MiB (-0.01%)

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-rustdoc-json Area: Rustdoc JSON backend 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-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-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.