Skip to content

Fix NativeAOT test layout's CoreCLR runtime dependency - #135951

Merged
agocke merged 1 commit into
dotnet:mainfrom
MichalStrehovsky:nativeaot-wasm-test-layout
Oct 17, 2026
Merged

agocke merged 1 commit into
dotnet:mainfrom
MichalStrehovsky:nativeaot-wasm-test-layout

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

Summary

Remove NativeAOT test layout generation's accidental dependency on CoreCLR runtime files.

NativeAOT WASI test builds fail during Core_Root generation with "The 'coreclr' subset must be built before building this project", even when the NativeAOT SDK and compiler are available. Desktop NativeAOT builds incidentally satisfy this check by staging a target JIT into sharedFramework; the WASM cross-JIT lives elsewhere.

Skip CoreCLR runtime-file resolution in NativeAOT mode while preserving the remaining layout generation and NativeAOT tool staging. Also omit unused WASM host/runtimepack assets and the WASI ReadyToRun composer requirement in that mode. CoreCLR test layouts retain their existing behavior.

Validation

On the combined local NativeAOT WASI bringup tree, including other unmerged enablement:

  • After deleting the test artifacts, .\src\tests\build.cmd nativeaot checked tree nativeaot wasm wasi regenerated the layout and reached unrelated test compilation failures.
  • .\src\tests\build.cmd nativeaot checked test nativeaot\SmokeTests\AttributeTrimming\AttributeTrimming.csproj wasm wasi passed.
  • AttributeTrimming executed under Wasmtime with exit code 100; copied NativeAOT SDK/compiler files matched the product outputs.

This branch contains only this cherry-picked commit from main; it was not built independently. Automated WASI test execution and Unix-host bringup are not included.

Note

This PR description was generated by GitHub Copilot.

NativeAOT WASI layout generation fails with:
"The 'coreclr' subset must be built before building this project."

Desktop clr.aot builds incidentally populate RuntimeFiles with the target
JIT in sharedFramework. WASM's host-side cross-JIT is not staged there,
leaving RuntimeFiles empty despite available NativeAOT outputs.

The necessary fix skips CoreCLR runtime resolution for NativeAOT layouts
while preserving other staging. As hygiene, also omit unused WASM host
assets and the WASI ReadyToRun composer requirement.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: a6f3a617-acae-4f4f-95d3-20b2a0bac43c
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.

@agocke

agocke commented Oct 17, 2026

Copy link
Copy Markdown
Member

/ba-g unrelated diagnostics failures

@agocke
agocke merged commit 8a850af into dotnet:main Oct 17, 2026
92 of 97 checks passed
@MichalStrehovsky
MichalStrehovsky deleted the nativeaot-wasm-test-layout branch October 17, 2026 11:16
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 19, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-NativeAOT-coreclr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants