Rollup of 12 pull requests#156213
Closed
jhpratt wants to merge 32 commits intorust-lang:mainfrom
Closed
Conversation
On AIX, PGO runtimes and ifunc support requires the named section linker feature which collects the name sections together and generates start/stop symbols for them. This change adds the option to the default linker args for the target.
ci-llvm include paths were leaking into debuginfo of `librustc_driver` via C/C++ compilation in rustc_llvm, causing non-determinism across stage2 builds. extend debug path remapping to the C/C++ build in rustc_llvm by converting RUSTC_DEBUGINFO_MAP into corresponding -fdebug-prefix-map flags and passing them through cc::Build.
Co-authored-by: Urgau <[email protected]>
This removes a separate call in the x86_64-gnu-llvm-21-3 job which runs the ui-fulldeps a second time. ui-fulldeps is already running in the first call (`../x.py --stage 1 test`) as it is a default test suite. This was added in rust-lang#116009, but I think that was a misunderstanding of the problem. The actual problem was fixed in rust-lang#116932 where the actual problem was the use of `&&`. This doesn't really have much of an impact on CI time (only a couple seconds) because all the tests are skipped with `ignored, up-to-date`. I'm mainly doing this to clean up the script itself for clarity.
generic_const_args: allow paths to non type consts tracking issue: rust-lang#151972 Non type consts should be usable in the type system in `feature(generic_const_args)`. These are directly plugged into the constant evaluator, unlike type consts, which are attempted to be reasoned about by the type system. Inherent associated constants are not supported at this time, due to complications around how generic arguments are represented for them (it's currently a mess). The mess is being cleaned up (e.g. rust-lang#154758), so instead of trying to hack support in before the refactoring is done, let's just wait to be able to implement it more cleanly. r? @BoxyUwU
Added command-line argument support for `wasm32-wali-linux-musl`
…kingjubilee [AIX] add -bdbg:namedsects:ss link arg On AIX, the PGO runtime and ifunc runtime support requires the named section linker feature which collects the name sections together and generates start/stop symbols for them. This change adds the option to the default linker args for the target.
…xcrichton Wasm: remove implicit `__heap_base`/`__data_end` exports This is kind of a follow-up to rust-lang#147225. Currently `__heap_base`/`__data_end` globals are implicitly exported on `wasm*-unknown-unknown` and `wasm32v1-none`, even though they were only used for Wasm multi-threading, requiring the atomics target feature and shared memory. Instead users should explicitly opt-in to these features, in which case toolchains, like `wasm-bindgen`, would require some linker flags. After this PR the following would be required for multi-threading support in `wasm-bindgen`: ``` -Clink-arg=--shared-memory -Clink-arg=--max-memory=1073741824 -Clink-arg=--import-memory -Clink-arg=--export=__heap_base -Clink-arg=--export=__wasm_init_tls -Clink-arg=--export=__tls_size -Clink-arg=--export=__tls_align -Clink-arg=--export=__tls_base ``` You will notice that the only new addition is `--export=__heap_base`, apparently `wasm-bindgen` doesn't need `__data_end` anymore (I didn't dig into the original motivation). --- For context why `wasm-bindgen` needed access to `__heap_base`: There is currently no mechanism in the Wasm tool conventions that automatically allocates the stack for every thread (e.g. via the `start` function). So `wasm-bindgen` has to explicitly call `malloc` to allocate the stack on the new thread. However, calling `malloc` itself requires a stack to be present! With the help of `__heap_base` `wasm-bindgen` constructs a temporary stack to make this work. This is obviously quite hacky. A newer implementation could go a different route: e.g. allocate the threads stack in the main thread and passing the right information on, not requiring access to `__heap_base` at all (and avoiding this really messy workaround). I should also note here that e.g. [`js-bindgen`](https://github.com/wasm-bindgen/js-bindgen), the successor currently being worked on, doesn't need any of these exports because it doesn't rely on post-processing. In which case all of these variables can be accessed by name at link-time, instead of requiring the linker to export each variable for post-processing to find them by name. That is to say: all these workaround are toolchain-specific and not universal to the Wasm targets. --- r? @alexcrichton
…remap2, r=Urgau fix: remap ci-llvm debug paths via `-ffile-prefix-map` ### problem: ci-llvm include paths leak into debuginfo of `librustc_driver` via C/C++ compilation in `rustc_llvm` , causing non-determinism across two stage2 hermetic builds. this exhibits as suffixes differing in `anon.*.llvm.<hash>` and mismatched GNU Build IDs, this persists even after stripping the debuginfo. `remap-debuginfo` does not cover this, it only applies to rustc and not to C/C++ compiler. ### fix: extend debug path remapping to the C/C++ build in `rustc_llvm` by converting `RUSTC_DEBUGINFO_MAP` into corresponding `-fdebug-prefix-map` flags and passing them through `cc::Build`. **this is a targeted fix in rustc_llvm; a more general solution would involve propagating remap flags across rustc <-> cargo <-> build scripts.** r? @Urgau
port `rustc_ast*` crates from `box_` to `deref_patterns` Part of rust-lang#156110, this ports the first few crates away from `box_patterns` to `deref_patterns`.
Don't run ui-fulldeps tests twice in stage 1 This removes a separate call in the x86_64-gnu-llvm-21-3 job which runs the ui-fulldeps a second time. ui-fulldeps is already running in the first call (`../x.py --stage 1 test`) as it is a default test suite. This was added in rust-lang#116009, but I think that was a misunderstanding of the problem. The actual problem was fixed in rust-lang#116932 where the actual problem was the use of `&&`. This doesn't really have much of an impact on CI time (only a couple seconds) because all the tests are skipped with `ignored, up-to-date`. I'm mainly doing this to clean up the script itself for clarity.
Always use `ConstFn` context for `const` closures fixes rust-lang#155803 Since rust-lang@e8a4611, `hir_body_const_context()` returned the parent's const context for a `const` closure. But a `const` closure can escape its enclosing body via a `fn`-pointer-typed const item or an opaque return type and be invoked at runtime, so it must be const-checked under the most restrictive `ConstFn` context like a regular `const fn`. r? oli-obk (since you authored the commit mentioned above, feel free to reroll)
interpret: correctly deal with repr(transparent) enums Fixes rust-lang/miri#4998
Use `all_impls` instead of handrolling it just found this while looking at other things
Adjust getMCSubtargetInfo signature for LLVM 23+ A recent [LLVM PR](llvm/llvm-project#195032) changed the signature of `getMCSubtargetInfo` to return a reference instead of a pointer. This adjusts uses of the function in `compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp` to account for the different signature.
move generalization test The forth test of rust-lang/trait-system-refactor-initiative#191 (comment) isn't actually related to closure signature inference. closes rust-lang/trait-system-refactor-initiative#191, which has already been fixed by rust-lang#155767 r? types
Member
Author
|
@bors r+ rollup=never p=5 |
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
May 5, 2026
Rollup of 12 pull requests Successful merges: - #155341 (generic_const_args: allow paths to non type consts) - #156062 (Added command-line argument support for `wasm32-wali-linux-musl`) - #156159 ([AIX] add -bdbg:namedsects:ss link arg) - #156174 (Wasm: remove implicit `__heap_base`/`__data_end` exports) - #156186 (fix: remap ci-llvm debug paths via `-ffile-prefix-map`) - #156193 (port `rustc_ast*` crates from `box_` to `deref_patterns`) - #156201 (Don't run ui-fulldeps tests twice in stage 1) - #155808 (Always use `ConstFn` context for `const` closures) - #156105 (interpret: correctly deal with repr(transparent) enums) - #156148 (Use `all_impls` instead of handrolling it) - #156156 (Adjust getMCSubtargetInfo signature for LLVM 23+) - #156205 (move generalization test)
Member
Author
|
stalled. closing in favor of a larger rollup |
Contributor
|
This pull request was unapproved due to being closed. Auto build was cancelled due to the PR being closed. Cancelled workflows: |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
wasm32-wali-linux-musl#156062 (Added command-line argument support forwasm32-wali-linux-musl)__heap_base/__data_endexports #156174 (Wasm: remove implicit__heap_base/__data_endexports)-ffile-prefix-map#156186 (fix: remap ci-llvm debug paths via-ffile-prefix-map)rustc_ast*crates frombox_toderef_patterns#156193 (portrustc_ast*crates frombox_toderef_patterns)ConstFncontext forconstclosures #155808 (Always useConstFncontext forconstclosures)all_implsinstead of handrolling it #156148 (Useall_implsinstead of handrolling it)r? @ghost
Create a similar rollup