Set CoreCLR runtime flavor for WASM Webcil conversion - #5327
Merged
LoopedBard3 merged 1 commit intoOct 1, 2026
Merged
Conversation
Apply RuntimeFlavor after BenchmarkDotNet's UseMonoRuntime override so Webcil conversion selects the CoreCLR format. Cover R2R and non-R2R property evaluation while preserving Mono defaults. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The targeted configuration change is correct, documented, and covered across CoreCLR, Mono, and ReadyToRun combinations.
Review effort: Balanced
Findings: None
What changed in this PR
Ensures CoreCLR WASM builds select Webcil wrapper version 2 regardless of ReadyToRun.
Changes:
- Sets
RuntimeFlavor=CoreCLRwhen Mono is disabled. - Adds MSBuild regression coverage.
- Documents the configuration behavior.
| File | Description |
|---|---|
src/benchmarks/micro/MicroBenchmarks.Wasm.targets |
Sets the CoreCLR runtime flavor. |
scripts/tests/test_wasm_coreclr_r2r.py |
Tests flavor evaluation and import order. |
docs/benchmarking-workflow-dotnet-runtime.md |
Documents CoreCLR Webcil selection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
LoopedBard3
marked this pull request as ready for review
September 29, 2026 20:19
Member
Author
|
This specific failure is being seen as part of |
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
Set
RuntimeFlavor=CoreCLRwhenUseMonoRuntime=falseinMicroBenchmarks.Wasm.targets, independently of the ReadyToRun opt-in. BenchmarkDotNet imports.Wasm.propsbefore its CoreCLR override and.Wasm.targetsafterward, so the setting must be applied in the latter.After dotnet/runtime#134312, CoreCLR requires Webcil wrapper version 2. The WebAssembly SDK selects Webcil payload version 1 (which produces wrapper version 2) only when
RuntimeFlavor=CoreCLR; the pinned BenchmarkDotNet generator setsUseMonoRuntime=falsebut leavesRuntimeFlavorunset. This can produce wrapper version 0 for converted assemblies, causing errors such asWebcil asset '/Dia2Lib.dll' has unsupported Webcil wrapper version 0; expected 2.Add MSBuild-backed regression coverage for CoreCLR with and without R2R, unchanged Mono/unset behavior, and the generated project import order. Document the configuration in the WASM workflow. No runtime changes or private Webcil-version override.
Validation
python -m pytest scripts\tests\test_wasm_coreclr_r2r.py -q: 47 passed, including 12 new MSBuild evaluation cases. The new tests reproduced 4 CoreCLR failures / 8 passes before the fix.Microsoft.NET.Sdk.WebAssembly.Browser.targetsatb965265e2454e3469580c09012e424e46608e7d7executed_ResolveWasmConfiguration: baseline CoreCLR selected payload 0; fixed CoreCLR selected payload 1 with R2R off and on; Mono remained payload 0.git diff --checkpassed.87daace271a6b571add2744f6e834b74838f6088, withonlySanityCheck=true, reusing post-Webcil-v2 runtime bundles from build 3090494. Actual benchmark work items, not just submission/controller tasks, completed with exit code 0:--wasm-runtime-flavor CoreCLR --wasm-ready-to-run; console contains nounsupported WebcilorNo Workload Resultserrors.runtime-perf-job.ymldownload conditions also requestLinuxMonoAOTx64from the current build. That native artifact is absent from this artifact-reuse/WASM-only validation run. The Webcil property change does not modify those conditions. Mono AOT remains unvalidated; no CI was rerun.This was the requested sanity subset (
System.Tests.Perf_*, partition 0), not the full microbenchmark suite. No benchmark execution or full WASM publish was performed locally.AI disclosure: This change and its regression coverage were prepared with GitHub Copilot.