Skip to content

Rollup of 11 pull requests #129831

New issue

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

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

Already on GitHub? # to your account

Merged
merged 34 commits into from
Aug 31, 2024
Merged

Rollup of 11 pull requests #129831

merged 34 commits into from
Aug 31, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

jieyouxu and others added 30 commits August 26, 2024 18:19
Since run-make tests do not support revisions.
Without suitable `needs-llvm-components` directives, these tests that
rely on target-specific codegen can fail if used with a LLVM that is
built without the required components.
This also migrates from legacy `cargo:` directives to the newer `cargo::`
prefix.
This file was introduced in LLVM 11, but was then removed in LLVM 13.
The whole file is surrounded by `#if defined(_WIN32)`, so there's no need to
have separate logic to exclue it from non-Windows builds.
This behaviour was introduced during the upgrade to LLVM 11. Now that the list
of source files has been cleaned up, we can reasonably expect _all_ of the
listed source files to be present.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
opt-dist overrides the stage 0 compiler with previously compiled compilers,
which can cause confusion in bootstrap's target sanity checks. It is best to
skip that check.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
This keeps it up-to-date by moving from 0.5.6 to 0.5.7. While here I've
additionally updated some other wasm-related dependencies in the
workspace to keep them up-to-date and try to avoid duplicate versions as
well.
Co-authored-by: Ralf Jung <post@ralfj.de>
This typo looks unnecessary
…mulacrum

Add release notes for 1.81.0

cc ``@rust-lang/release``
r? ``@Mark-Simulacrum``
…Mark-Simulacrum

Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen

Without suitable `needs-llvm-components` directives, some run-make tests exercising target-specific codegen can fail if the LLVM used is built without the necessary components. Currently, the list is:

```
tests\run-make\print-target-list
tests\run-make\print-to-output
tests\run-make\print-cfg
tests\run-make\target-without-atomic-cas
```

This PR also skips tidy checks for revisions and `needs-llvm-components` for run-make tests since revisions are not supported.

Fixes rust-lang#129390.
Fixes rust-lang#127895.

cc ``@petrochenkov`` who noticed this, thanks! Would be great if you could confirm that this fixes the test errors for you locally.
…-Simulacrum

Clean up `library/profiler_builtins/build.rs`

This PR makes a series of improvements to the long-neglected build script for `profiler_builtins`.

Most notably:
- The logic that silently skips missing source files has been removed, since it is currently unnecessary and makes build errors more confusing.
- The script now emits `cargo::rerun-if-changed` directives for the `compiler-rt` source and include directories.

Compiler behaviour and user programs should be unaffected by these changes.
…eck, r=Kobzol

skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set

When adding a new target to `rustc` and extending `STAGE0_MISSING_TARGETS`, there is a chance that in the merge CI bootstrap target sanity check might fail [here](https://github.com/rust-lang/rust/blob/26d27b7c8729fb61fe8321fcd2ce734a79aa695d/src/bootstrap/src/core/sanity.rs#L243-L256) because the stage 0 compiler will assume to already support the new target since `opt-dist` uses the previously compiled compiler as the stage 0 compiler.

This PR skips this check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set, and makes `opt-dist` to set `BOOTSTRAP_SKIP_TARGET_SANITY` so bootstrap doesn't run this logic for opt-dist tests.

Fixes rust-lang#127021 (comment).

Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/.60STAGE0_MISSING_TARGETS.60.20seems.20to.20check.20stage1

Blocker for rust-lang#127021
… r=RalfJung

Enable Miri to pass pointers through FFI

Following rust-lang#126787, the purpose of this PR is to now enable Miri to execute native calls that make use of pointers.

> <details>
>
> <summary> Simple example </summary>
>
> ```rust
> extern "C" {
>     fn ptr_printer(ptr: *mut i32);
> }
>
> fn main() {
>     let ptr = &mut 42 as *mut i32;
>     unsafe {
>         ptr_printer(ptr);
>     }
> }
> ```
> ```c
> void ptr_printer(int *ptr) {
>   printf("printing pointer dereference from C: %d\n", *ptr);
> }
> ```
> should now show `printing pointer dereference from C: 42`.
>
> </details>

Note that this PR does not yet implement any logic involved in updating Miri's "analysis" state (byte initialization, provenance) upon such a native call.

r? ``@RalfJung``
…-ld, r=jieyouxu

Update the `wasm-component-ld` binary dependency

This keeps it up-to-date by moving from 0.5.6 to 0.5.7. While here I've additionally updated some other wasm-related dependencies in the workspace to keep them up-to-date and try to avoid duplicate versions as well.
couple more crash tests

r? ```@jieyouxu```
…er-errors

make the const-unstable-in-stable error more clear

The default should be to add `rustc_const_unstable`, not `rustc_allow_const_fn_unstable`.

Also I discovered our check for missing const stability attributes on stable functions -- but strangely that check only kicks in for "reachable" functions. `check_missing_stability` checks for reachability since all reachable functions must have a stability attribute, but I would say if a function has `#[stable]` it should also have const-stability attributes regardless of reachability.
…s-mobile, r=notriddle

Fix code examples buttons not appearing on click on mobile

When browsing docs on mobile today, I realized that the buttons didn't appear when I tapped on the code example.

One issue: I have no idea how to add a regression test for this case...

r? ``@notriddle``
library: Fix typo in `core::mem`

This typo looks unnecessary
@rustbot rustbot added 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) 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. T-release Relevant to the release subteam, 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 Aug 31, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=11

@bors
Copy link
Collaborator

bors commented Aug 31, 2024

📌 Commit 4151fd4 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 Aug 31, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 31, 2024
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#128523 (Add release notes for 1.81.0)
 - rust-lang#129605 (Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen)
 - rust-lang#129650 (Clean up `library/profiler_builtins/build.rs`)
 - rust-lang#129651 (skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set)
 - rust-lang#129684 (Enable Miri to pass pointers through FFI)
 - rust-lang#129762 (Update the `wasm-component-ld` binary dependency)
 - rust-lang#129782 (couple more crash tests)
 - rust-lang#129816 (tidy: say which feature gate has a stability issue mismatch)
 - rust-lang#129818 (make the const-unstable-in-stable error more clear)
 - rust-lang#129824 (Fix code examples buttons not appearing on click on mobile)
 - rust-lang#129826 (library: Fix typo in `core::mem`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Aug 31, 2024

⌛ Testing commit 4151fd4 with merge d37b074...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-ext failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] miri test:false 4.506
error: failed to remove file `C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-tools\x86_64-pc-windows-msvc\release\miri.exe`

Caused by:
  Access is denied. (os error 5)
Command has failed. Rerun with -v to see more details.
  local time: Sat, Aug 31, 2024  8:57:49 PM
  network time: Sat, 31 Aug 2024 20:57:49 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@matthiaskrgr
Copy link
Member Author

@bors retry

@bors
Copy link
Collaborator

bors commented Aug 31, 2024

⌛ Testing commit 4151fd4 with merge a7399ba...

@bors
Copy link
Collaborator

bors commented Aug 31, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 31, 2024
@bors bors merged commit a7399ba into rust-lang:master Aug 31, 2024
7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 31, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#128523 Add release notes for 1.81.0 212d4686d4013fe9cef1893f3a9e82b0ad5313d0 (link)
#129605 Add missing needs-llvm-components directives for run-make… bfb6bb7397eba971e2fa1a8ae972c22b095a8151 (link)
#129650 Clean up library/profiler_builtins/build.rs 10d86dfa67e35f1cbff6c56be926d7a5d55ad3ac (link)
#129651 skip stage 0 target check if BOOTSTRAP_SKIP_TARGET_SANITY 4781d282dee3c0b385e7bcfc0a150427a39da67f (link)
#129684 Enable Miri to pass pointers through FFI 563249134369c2782781e75135f7022476131647 (link)
#129762 Update the wasm-component-ld binary dependency 4550e401c00284bcc9dccc297f51bb40635614dd (link)
#129782 couple more crash tests 3599749053eb51f99ea4b6f8d44d6d002f96fb1c (link)
#129816 tidy: say which feature gate has a stability issue mismatch 804fb9880443af6fb5ec58323dc5509de82472b6 (link)
#129818 make the const-unstable-in-stable error more clear 410ee6d770a45a0660c04885251a3530ff9f9eab (link)
#129824 Fix code examples buttons not appearing on click on mobile 75ab755dc2814623f0ebcf1048f192bce574d0e9 (link)
#129826 library: Fix typo in core::mem 360cfe1211b139aa5e233e3da80a4f559443dbe4 (link)

previous master: d571ae851d

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

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a7399ba): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.9% [0.4%, 1.9%] 3
Improvements ✅
(primary)
-2.5% [-2.5%, -2.5%] 1
Improvements ✅
(secondary)
-0.4% [-0.4%, -0.3%] 2
All ❌✅ (primary) -2.5% [-2.5%, -2.5%] 1

Max RSS (memory usage)

Results (primary 0.3%, secondary 0.2%)

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)
0.8% [0.4%, 2.3%] 27
Regressions ❌
(secondary)
0.7% [0.4%, 1.7%] 45
Improvements ✅
(primary)
-0.6% [-1.3%, -0.4%] 18
Improvements ✅
(secondary)
-0.9% [-1.8%, -0.4%] 20
All ❌✅ (primary) 0.3% [-1.3%, 2.3%] 45

Cycles

Results (primary -0.3%, secondary 0.1%)

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.7% [0.4%, 4.6%] 6
Regressions ❌
(secondary)
1.2% [0.4%, 6.0%] 53
Improvements ✅
(primary)
-0.8% [-2.4%, -0.4%] 25
Improvements ✅
(secondary)
-0.8% [-3.5%, -0.4%] 66
All ❌✅ (primary) -0.3% [-2.4%, 4.6%] 31

Binary size

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

Bootstrap: 789.576s -> 789.249s (-0.04%)
Artifact size: 338.70 MiB -> 338.76 MiB (0.02%)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
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. perf-regression Performance regression. 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-libs Relevant to the library team, which will review and decide on the PR/issue. T-release Relevant to the release subteam, 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.