Disable unused ReadyToRun metadata on WebAssembly - #134690
Open
davidwrighton wants to merge 1 commit into
Open
davidwrighton wants to merge 1 commit into
davidwrighton wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 4 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Member
|
related #134689 |
Contributor
|
Tagging subscribers to this area: @agocke |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Correct the unsafe derived-to-base pointer-to-pointer cast in ReadyToRun section loading.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Disables unsupported ReadyToRun metadata emission and loading for WebAssembly builds.
Changes:
- Gates inline-tracking support on runtime features.
- Strips inline and debug metadata from Browser/WASI images.
- Removes legacy version checks and documents supported sections.
| File | Summary |
|---|---|
src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets |
Adds Browser/WASI stripping flags. |
src/coreclr/vm/zapsig.cpp |
Removes obsolete version gating. |
src/coreclr/vm/readytoruninfo.h |
Gates inline-tracking state and APIs. |
src/coreclr/vm/readytoruninfo.cpp |
Updates metadata loading and removes legacy checks. |
src/coreclr/vm/loaderallocator.cpp |
Gates inline-tracking cleanup locking. |
src/coreclr/vm/inlinetracking.h |
Removes legacy map definitions and gates support. |
src/coreclr/vm/inlinetracking.cpp |
Removes legacy map implementation. |
src/coreclr/vm/ceemain.cpp |
Gates inline-tracking initialization. |
src/coreclr/vm/ceeload.h |
Gates related declarations and state. |
src/coreclr/vm/ceeload.cpp |
Gates related implementations. |
src/coreclr/inc/switches.h |
Defines the feature condition. |
src/coreclr/crossgen-corelib.proj |
Adds stripping flags for CoreLib WASM output. |
docs/design/coreclr/botr/readytorun-format.md |
Documents runtime section consumption. |
davidwrighton
marked this pull request as ready for review
September 25, 2026 23:33
jkotas
reviewed
Sep 26, 2026
| #endif // _DEBUG | ||
|
|
||
| #if defined(PROFILING_SUPPORTED) || defined(PROFILING_SUPPORTED_DATA) || defined(FEATURE_REJIT) || defined(FEATURE_CODE_VERSIONING) | ||
| #define FEATURE_INLINE_TRACKING_ENABLED |
Member
There was a problem hiding this comment.
Suggested change
| #define FEATURE_INLINE_TRACKING_ENABLED | |
| #define FEATURE_INLINE_TRACKING |
_ENABLED suffix is redundant on FEATURE_ macros. None of the existing FEATURE_ macros have it.
lewing
added a commit
that referenced
this pull request
Sep 26, 2026
#134690 adds --strip-debug-info and --strip-inlining-info for browser and wasi ReadyToRun where the other strip defaults live, so the wasm pack shouldn't add its own. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.

Summary
Avoid emitting and loading ReadyToRun metadata that CoreCLR WebAssembly cannot consume.
InliningInfosection while retaining R2RDump support.FEATURE_INLINE_TRACKING_ENABLEDfrom the profiling, ReJIT, and code-versioning feature macros, which leaves inline tracking disabled in WebAssembly builds.System.Private.CoreLib.wasmand framework-library.wasmfiles. The existingPublishReadyToRunStripInliningInfo=falseandPublishReadyToRunStripDebugInfo=falseopt-outs remain available.Validation
./build.sh clr -c Checked./build.sh clr+libs -os browser -c Release#errorforTARGET_WASM && FEATURE_INLINE_TRACKING_ENABLED; the Browser/Wasm CoreCLR build succeeded, confirming the feature is disabled.System.Private.CoreLib.wasmcontains both--strip-inlining-infoand--strip-debug-info.System.Private.CoreLib.wasmand all 101 Release framework-library.wasmimages contain none of:DebugInfoInliningInfoInliningInfo2CrossModuleInlineInfoNote
This pull request description was generated with GitHub Copilot.