Add basic test for crossgen2 WebCIL#128609
Open
jtschuster wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the ILCompiler.ReadyToRun test harness to support non-.dll crossgen2 outputs and adds a minimal xUnit test case that runs crossgen2 targeting wasm/browser to produce a WASM-wrapped WebCIL payload and validates it via WebcilImageReader.
Changes:
- Add
CrossgenCompilation.OutputFileExtensionand use it when computing crossgen2 output paths. - Remove unused
Crossgen2Optionenum values and their argument mappings. - Add a new WebCIL test case source file plus a new xUnit test (
WasmWebcilModule) that compiles/validates a.wasmWebCIL output.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/coreclr/tools/aot/ILCompiler.ReadyToRun.Tests/TestCasesRunner/R2RTestRunner.cs | Adds configurable output extension for crossgen2 output path generation (enables .wasm outputs). |
| src/coreclr/tools/aot/ILCompiler.ReadyToRun.Tests/TestCasesRunner/R2RDriver.cs | Removes unused crossgen2 option enum entries/mappings. |
| src/coreclr/tools/aot/ILCompiler.ReadyToRun.Tests/TestCases/Webcil/WasmWebcilModule.cs | New embedded-source test input used to produce a WebCIL payload. |
| src/coreclr/tools/aot/ILCompiler.ReadyToRun.Tests/TestCases/R2RTestSuites.cs | Adds an xUnit test that invokes crossgen2 for wasm/browser and validates WebCIL-in-WASM output. |
Comment on lines
+111
to
+115
| /// <summary> | ||
| /// File extension for the crossgen2 output image. | ||
| /// </summary> | ||
| public string OutputFileExtension { get; init; } = ".dll"; | ||
|
|
adamperlin
approved these changes
May 26, 2026
Contributor
adamperlin
left a comment
There was a problem hiding this comment.
This looks good to me!
This was referenced May 27, 2026
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.
Adds a super basic test to run a crossgen2 compilation and emit a WASM WebCIL payload.