Fix CLR_Tools_Tests build break in WasmArgumentLayoutTests - #131505
Merged
Conversation
WasmArgumentLayoutTests.CreateWasmContext constructs ReadyToRunCompilerContext with five arguments, but a targetAllowsRuntimeCodeGeneration parameter was added to that constructor, so the ILCompiler.ReadyToRun.Tests project no longer compiles. The two changes landed close enough together that neither one's CI saw the other. Pass false, which is what crossgen2's Program.GetTargetAllowsRuntimeCodeGeneration computes for --targetarch wasm --targetos browser, the configuration this test context mirrors. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: eb624f92-0ff3-435c-8963-5b203384fbed
|
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. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a build break in ILCompiler.ReadyToRun.Tests caused by an updated ReadyToRunCompilerContext constructor signature by passing the newly-required targetAllowsRuntimeCodeGeneration argument when constructing the wasm test context.
Changes:
- Update
CreateWasmContext()to passtargetAllowsRuntimeCodeGeneration: falsewhen creatingReadyToRunCompilerContext. - Add an inline comment explaining why wasm uses
falsefor runtime code generation.
jkoritzinsky
approved these changes
Jul 29, 2026
lewing
enabled auto-merge (squash)
July 29, 2026 00:35
Member
Author
|
/ba-g fast merging to fix build break |
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.
maindoes not currently build. Thelinux-x64 checked CLR_Tools_Testsleg fails inBuild product:Cause
A semantic merge conflict between two PRs that landed ~18 hours apart, so neither one's CI saw the other:
WasmArgumentLayoutTests.cs, whoseCreateWasmContextconstructsReadyToRunCompilerContextwith 5 arguments.bool targetAllowsRuntimeCodeGenerationparameter to that constructor, making it 6.Fix
Pass the missing argument.
falseis the value crossgen2 itself computes for this target:Program.GetTargetAllowsRuntimeCodeGenerationreturnsfalsewhen the OS isBrowser/Wasi/Apple-mobile or the architecture isWasm32, and this test context mirrors--targetarch wasm --targetos browser(as its own doc comment states). The flag governs whetherVector<T>stays optimistic and whether explicitly-unsupported ISA markers are emitted — on wasm there is no runtime codegen to fall back to.Validation
./build.sh clr+libs -rc Checkedsucceeds, andILCompiler.ReadyToRun.Tests.csprojthen compiles clean — the exact compile that fails in CI.WasmArgumentLayoutTestscases pass, so the regression coverage Make wasm 'V' signature raising deterministic and add a regression test #131429 added still tests what it was written to test.Other tests in that assembly fail on my macOS-arm64 box for an unrelated local reason (
DllNotFoundExceptionforclrjit_universal_arm64_arm64/clrjit_unix_x64_arm64—build.sh clr+libspublishes only the wasm cross-jit into the crossgen2 output directory on this host). Those suites invoke crossgen2 as a subprocess and do not touch the changed file.Fixes #131504
Note
This change was developed with GitHub Copilot and reviewed by me before submitting.