-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Rollup of 11 pull requests #150801
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
Closed
Rollup of 11 pull requests #150801
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: tison <[email protected]>
This commit reorders some cases in `export_symbols` in the linker implementation for wasm to ensure that the `is_like_wasm` case is handled before the catch-all `CrateType::Executable` case.
NVPTX does not support cycles in static initializers. LLVM produces an error when attempting to codegen such constructs (like self referential structs). To not produce LLVM UB we instead emit a post-monomorphization error on Rust side before reaching codegen. This is achieved by analysing a subgraph of the "mono item graph" that only contains statics: 1. Calculate the strongly connected components (SCCs) of the graph 2. Check for cycles (more than one node in a SCC or exactly one node which references itself)
Add a rustc intrinsic `amdgpu_dispatch_ptr` to access the kernel dispatch packet on amdgpu. The HSA kernel dispatch packet contains important information like the launch size and workgroup size. The Rust intrinsic lowers to the `llvm.amdgcn.dispatch.ptr` LLVM intrinsic, which returns a `ptr addrspace(4)`, plus an addrspacecast to `addrspace(0)`, so it can be returned as a Rust reference. The returned pointer/reference is valid for the whole program lifetime, and is therefore `'static`. The return type of the intrinsic (`*const ()`) does not mention the struct so that rustc does not need to know the exact struct type. An alternative would be to define the struct as lang item or add a generic argument to the function. Short version: ```rust #[cfg(target_arch = "amdgpu")] pub fn amdgpu_dispatch_ptr() -> *const (); ```
Having two dedicated target maintainers is a prerequisite for promoting this target to tier 2. I've been in contact with Ulrich and he's agreed to having me as a co-maintainer in preparation for a MCP to promote it to tier 2.
This is a safe function, which doesn't take a `ptr` parameter.
Add waker_fn and local_waker_fn to std::task This refers to rust-lang#149580.
…crum Update provider API docs Adds guidance on a specific provider API implementation anti pattern that implementers of the error trait should avoid. resolves rust-lang#99301 (comment)
`c_variadic`: provide our own `va_arg` implementation for more targets tracking issue: rust-lang#44930 Provide our own implementations in order to guarantee the behavior of `va_arg`. We will only be able to stabilize `c_variadic` on targets where we know and guarantee the properties of `va_arg`. r? workingjubilee
…, r=jdonszelmann rustc: Fix `-Zexport-executable-symbols` on wasm This commit reorders some cases in `export_symbols` in the linker implementation for wasm to ensure that the `is_like_wasm` case is handled before the catch-all `CrateType::Executable` case.
…r=workingjubilee Ensure that static initializers are acyclic for NVPTX NVPTX does not support cycles in static initializers (see rust-lang#146787). LLVM produces an error when attempting to generate code for such constructs, like self-referential structs. To avoid LLVM UB, we emit a post-monomorphization error on the Rust side before reaching codegen. This is achieved by analyzing a subgraph of the "mono item graph" that only contains statics. 1. Calculate the strongly connected components (SCCs) of the graph. 2. Check for cycles (more than one node in an SCC or one node that references itself).
…ubilee Add amdgpu_dispatch_ptr intrinsic There is an ongoing discussion in rust-lang#150452 about using address spaces from the Rust language in some way. As that discussion will likely not conclude soon, this PR adds one rustc_intrinsic with an addrspacecast to unblock getting basic information like launch and workgroup size and make it possible to implement something like `core::gpu`. Add a rustc intrinsic `amdgpu_dispatch_ptr` to access the kernel dispatch packet on amdgpu. The HSA kernel dispatch packet contains important information like the launch size and workgroup size. The Rust intrinsic lowers to the `llvm.amdgcn.dispatch.ptr` LLVM intrinsic, which returns a `ptr addrspace(4)`, plus an addrspacecast to `addrspace(0)`, so it can be returned as a Rust reference. The returned pointer/reference is valid for the whole program lifetime, and is therefore `'static`. The return type of the intrinsic (`&'static ()`) does not mention the struct so that rustc does not need to know the exact struct type. An alternative would be to define the struct as lang item or add a generic argument to the function. Is this ok or is there a better way (also, should it return a pointer instead of a reference)? Short version: ```rust #[cfg(target_arch = "amdgpu")] pub fn amdgpu_dispatch_ptr() -> *const (); ``` Tracking issue: rust-lang#135024 r? RalfJung as you are already aware of the background (feel free to re-assign)
./x check miri: enable check_only feature With this, we should no longer need to turn off the default features, so we can undo rust-lang#149550. @bjorn3 you seem to have a test setup to check if this works properly in terms of skipping all the work that should not be required -- could you test if this PR works as intended? FWIW we could now remove `default_features` from `run_tool_check_step`. Not sure if that's worth it.
Thread `--jobs` from `bootstrap` -> `compiletest` -> `run-make-support` Context is rust-lang#150524 (comment), where we would like to thread the `--jobs` config from bootstrap explicitly through to run-make tests without relying on an "external env var" that bypasses the build/test infra. Note that this PR currently intentionally couples the jobs configured for *builds*, versus for `TestMode::RunMake` tests. We can further specialize some kind of `run-make-jobs` bootstrap config *if actually needed*; I will keep this configuration naive for now. r? @Kobzol
Add AtomicPtr::null Implementation for rust-lang#150733. I marked this function as `#[must_use]` even though the other `AtomicPtr` constructors aren't. It's unclear to me why they aren't already marked as such, I opened a zulip thread asking about it: [#t-libs > Is there a reason AtomicPtr constructors aren't #&rust-lang#91;must_use&rust-lang#93;?](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Is.20there.20a.20reason.20AtomicPtr.20constructors.20aren't.20.23.5Bmust_use.5D.3F/with/566624261).
Add myself as co-maintainer for s390x-unknown-linux-musl Having two dedicated target maintainers is a prerequisite for promoting this target to tier 2. I've been in contact with Ulrich and he's agreed to having me as a co-maintainer in preparation for a MCP to promote it to tier 2. cc @uweigand
Fix copy-n-paste error in `vtable_for` docs This is a safe function, which doesn't take a `ptr` parameter.
Member
Author
|
@bors r+ rollup=never p=5 |
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors bot
added a commit
that referenced
this pull request
Jan 8, 2026
Rollup of 11 pull requests Successful merges: - #149976 (Add waker_fn and local_waker_fn to std::task) - #150074 (Update provider API docs) - #150094 (`c_variadic`: provide our own `va_arg` implementation for more targets) - #150164 (rustc: Fix `-Zexport-executable-symbols` on wasm) - #150569 (Ensure that static initializers are acyclic for NVPTX) - #150607 (Add amdgpu_dispatch_ptr intrinsic) - #150694 (./x check miri: enable check_only feature) - #150717 (Thread `--jobs` from `bootstrap` -> `compiletest` -> `run-make-support`) - #150736 (Add AtomicPtr::null) - #150787 (Add myself as co-maintainer for s390x-unknown-linux-musl) - #150789 (Fix copy-n-paste error in `vtable_for` docs) r? @ghost
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 9147292 failed: CI. Failed jobs:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-compiletest
Area: The compiletest test runner
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-test-infra-minicore
Area: `minicore` test auxiliary and `//@ add-core-stubs`
A-testsuite
Area: The testsuite used to check the correctness of rustc
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-libs
Relevant to the library team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
c_variadic: provide our ownva_argimplementation for more targets #150094 (c_variadic: provide our ownva_argimplementation for more targets)-Zexport-executable-symbolson wasm #150164 (rustc: Fix-Zexport-executable-symbolson wasm)--jobsfrombootstrap->compiletest->run-make-support#150717 (Thread--jobsfrombootstrap->compiletest->run-make-support)vtable_fordocs #150789 (Fix copy-n-paste error invtable_fordocs)r? @ghost
Create a similar rollup