Skip to content

Rollup of 10 pull requests #144508

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

Closed
wants to merge 23 commits into from

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Jul 26, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 23 commits July 23, 2025 14:19
A recent change altered the definition of the link! macro when the windows_raw_dylib feature is enabled, changing its syntax from pub macro {..} to pub macro($tt:tt) {..} in rust-lang#143592

This change introduced a build failure with the error: "macros that expand to items must be delimited with braces or followed by a semicolon".

We add a semicolon to the line causing the issue as we also modify the non windows_raw_dylib link to make use of the link_dylib macro
Since this test is limited to aarch64 and linux hosts, the --target
flag is entirely unnecessary and only breaks this on musl hosts. Let the
compiler use the default target instead.

Signed-off-by: Jens Reidel <[email protected]>
I missed this during review. We cannot declare a `tests` module within
`shared_helpers.rs` itself, as shim binaries that tries to include the
`shared_helpers` module through `#[path = ".."]` attributes would fail
to find it, breaking `./x check bootstrap`.

This reverts commit `40c2ca96411caaeab1563ff9041879f742d1d71b`.
This check is relatively cheap, and is a quick way to root out breaking
check flow of `bootstrap` itself.
…r-errors

add codegen test for variadics

This is a part of rust-lang#144066 that can land without FCP.
…ly-abort, r=oli-obk

Stop compilation early if macro expansion failed

Fixes rust-lang#116180.

So there isn't really a type that is central for macro expansion and some errors are actually emitted (because the resolution happens after the expansion I suppose) after the expansion pass (like "not found macro"). Sometimes, errors are only emitted on the second "try" (to improve error output). So I couldn't reach a similar solution than what was done in rust-lang#133937 and suggested by `@estebank` in rust-lang#116180 (comment). But maybe I missed something?

So in the end, I realized that there is method called every time (except one, described below) a macro error is actually emitted: `ExtCtxt::trace_macros_diag`. Considering I updated what it did, I renamed it into `macro_error_and_trace_macros_diag` to better reflect it.

There is only one call of `trace_macros_diag` which isn't reporting an error but just used for `macro_trace` feature, so I kept it as is.

r? `@oli-obk`
library/windows_targets: Fix macro expansion error in 'link' macro

A recent change altered the definition of the link! macro when the windows_raw_dylib feature is enabled, changing its syntax from pub macro {..} to pub macro($tt:tt) {..} in rust-lang#143592

This change introduced a build failure with the error: "macros that expand to items must be delimited with braces or followed by a semicolon".

We add a semicolon to the line causing the issue as we also modify the non windows_raw_dylib link to make use of the link_dylib macro
…target, r=Noratrieb

tests: aarch64-outline-atomics: Remove hardcoded target

Since this test is limited to aarch64 and linux hosts, the `--target` flag is entirely unnecessary and only breaks this on musl hosts. Let the compiler use the default target instead.
…ts, r=Kobzol

Fix `./x check bootstrap` (again)

Redoes rust-lang#134883 and reverts 40c2ca9 from rust-lang#142416. Unfortunately I missed this during review.

- Commit 1: Reverts 40c2ca9 and re-applies rust-lang#134883.
- Commit 2: Check `./x check bootstrap` in `pr-check-1` to catch "obvious" problems like this.

r? Kobzol
… r=jieyouxu

canonicalize build root in `tests/run-make/linker-warning`

r? jieyouxu

This is similar to rust-lang#139823 -- the test fails for me because my build dir is a symlink.
move uefi test to run-make

Turn the `uefi` test into a more standard `run-make` test, and execute it using the `test-various` CI job like before.

This is just a straightforward translation of the python code, but using `run-make` to supply the target (hence the 3 separate calls in the docker file).

r? `@jieyouxu`
cc `@nicholasbishop`

try-job: test-various
Only run bootstrap tests in `x test` on CI

Discussed at https://rust-lang.zulipchat.com/#narrow/channel/122652-new-members/topic/Linux.20Distribution/with/530839642. The bootstrap tests can be sensitive of the environment where they are executed. And now that they are executed very early in the test pipeline, it can be annoying for people who just try to do `x test` when it fails on bootstrap tests.

We could move the bootstrap tests back to the end of the `x test` pipeline, but then it would just fail later. I'd prefer to only run them on CI by default.

Fixes: rust-lang#143973
bump cargo_metadata

Bumps cargo_metadata. Change that required fixes is: oli-obk/cargo_metadata@e3373d0
… r=ChrisDenton

thread name in stack overflow message

Fixes rust-lang#144481, which is caused by the thread name not being initialised yet when setting up the stack overflow information. Unfortunately, the stack overflow UI test did not test for the correct thread name being present, and testing this separately didn't occur to me when writing rust-lang#140628.

This PR contains the smallest possible fix I could think of: passing the thread name explicitly to the platform thread creation function. In the future I'd very much like to explore some possibilities around merging the thread packet and thread handle into one structure and using that in the platform code instead – but that's best left for another PR.

This PR also amends the stack overflow test to check for thread names, so we don't run into this again.

`@rustbot` label +beta-nominated
@rustbot rustbot added A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool O-hermit Operating System: Hermit O-itron Operating System: ITRON labels Jul 26, 2025
@rustbot rustbot added O-SGX Target: SGX O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows 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-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. rollup A PR which is a rollup labels Jul 26, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jul 26, 2025

📌 Commit da89cf5 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 Jul 26, 2025
@bors
Copy link
Collaborator

bors commented Jul 26, 2025

⌛ Testing commit da89cf5 with merge f5b62eb...

bors added a commit that referenced this pull request Jul 26, 2025
Rollup of 10 pull requests

Successful merges:

 - #144359 (add codegen test for variadics)
 - #144409 (Stop compilation early if macro expansion failed)
 - #144422 (library/windows_targets: Fix macro expansion error in 'link' macro)
 - #144430 (tests: aarch64-outline-atomics: Remove hardcoded target)
 - #144445 (Fix `./x check bootstrap` (again))
 - #144453 (canonicalize build root in `tests/run-make/linker-warning`)
 - #144454 (move uefi test to run-make)
 - #144464 (Only run bootstrap tests in `x test` on CI)
 - #144495 (bump cargo_metadata)
 - #144500 (thread name in stack overflow message)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job test-various failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    CXX_i686_unknown_uefi=clang++-11 \
    CC_x86_64_unknown_uefi=clang-11 \
    CXX_x86_64_unknown_uefi=clang++-11
ENV UEFI_SCRIPT python3 /checkout/x.py --stage 2 build --host='' --target $UEFI_TARGETS && \
  python3 /checkout/x.py --stage 2 test tests/run-make/uefi-qemu/rmake.rs --target aarch64-unknown-uefi && \
  python3 /checkout/x.py --stage 2 test tests/run-make/uefi-qemu/rmake.rs --target i686-unknown-uefi && \
  python3 /checkout/x.py --stage 2 test tests/run-make/uefi-qemu/rmake.rs --target x86_64-unknown-uefi

ENV SCRIPT $WASM_SCRIPT && $NVPTX_SCRIPT && $MUSL_SCRIPT && $UEFI_SCRIPT
#!/bin/sh
# This script runs `musl-cross-make` to prepare C toolchain (Binutils, GCC, musl itself)
# and builds static libunwind that we distribute for static target.
---
DirectMap4k:      126912 kB
DirectMap2M:     7213056 kB
DirectMap1G:    11534336 kB
##[endgroup]
Executing python3 /checkout/x.py --stage 2 test --host= --target wasm32-wasip1   tests/run-make   tests/ui   tests/mir-opt   tests/codegen-units   tests/codegen-llvm   tests/assembly-llvm   library/core && python3 /checkout/x.py --stage 2 test --host= --target nvptx64-nvidia-cuda   tests/run-make   tests/assembly-llvm && python3 /checkout/x.py --stage 2 test --host= --target x86_64-unknown-linux-musl && python3 /checkout/x.py --stage 2 build --host= --target aarch64-unknown-uefi,i686-unknown-uefi,x86_64-unknown-uefi &&   python3 /checkout/x.py --stage 2 test tests/run-make/uefi-qemu/rmake.rs --target aarch64-unknown-uefi &&   python3 /checkout/x.py --stage 2 test tests/run-make/uefi-qemu/rmake.rs --target i686-unknown-uefi &&   python3 /checkout/x.py --stage 2 test tests/run-make/uefi-qemu/rmake.rs --target x86_64-unknown-uefi
+ python3 /checkout/x.py --stage 2 test --host= --target wasm32-wasip1 tests/run-make tests/ui tests/mir-opt tests/codegen-units tests/codegen-llvm tests/assembly-llvm library/core
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.05s
##[endgroup]
downloading https://static.rust-lang.org/dist/2025-06-24/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz
---

error[E0061]: this function takes 2 arguments but 3 arguments were supplied
   --> library/std/src/thread/mod.rs:598:30
    |
598 |             native: unsafe { imp::Thread::new(stack_size, my_thread.name(), main)? },
    |                              ^^^^^^^^^^^^^^^^             ---------------- unexpected argument #2 of type `Option<&str>`
    |
note: associated function defined here
   --> library/std/src/sys/pal/wasi/thread.rs:123:27
    |
123 |             pub unsafe fn new(_stack: usize, _p: Box<dyn FnOnce()>) -> io::Result<Thread> {
    |                           ^^^
help: remove the extra argument
    |
598 -             native: unsafe { imp::Thread::new(stack_size, my_thread.name(), main)? },
598 +             native: unsafe { imp::Thread::new(stack_size, main)? },
    |

For more information about this error, try `rustc --explain E0061`.
[RUSTC-TIMING] std test:false 2.613
warning: `std` (lib) generated 1 warning

@bors
Copy link
Collaborator

bors commented Jul 26, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 26, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 26, 2025
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-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool O-hermit Operating System: Hermit O-itron Operating System: ITRON O-SGX Target: SGX O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.