Skip to content

Fix CLR_Tools_Tests build break in WasmArgumentLayoutTests - #131505

Merged
lewing merged 1 commit into
mainfrom
lewing-fix-r2r-tests-build-break
Jul 29, 2026
Merged

Fix CLR_Tools_Tests build break in WasmArgumentLayoutTests#131505
lewing merged 1 commit into
mainfrom
lewing-fix-r2r-tests-build-break

Conversation

@lewing

@lewing lewing commented Jul 28, 2026

Copy link
Copy Markdown
Member

main does not currently build. The linux-x64 checked CLR_Tools_Tests leg fails in Build product:

src/coreclr/tools/aot/ILCompiler.ReadyToRun.Tests/WasmArgumentLayoutTests.cs(166,45): error CS7036: There is no argument given that corresponds to the required parameter 'instructionSetSupport' of 'ReadyToRunCompilerContext.ReadyToRunCompilerContext(TargetDetails, SharedGenericsMode, bool, bool, InstructionSetSupport, CompilerTypeSystemContext)'

Cause

A semantic merge conflict between two PRs that landed ~18 hours apart, so neither one's CI saw the other:

Fix

Pass the missing argument. false is the value crossgen2 itself computes for this target: Program.GetTargetAllowsRuntimeCodeGeneration returns false when the OS is Browser/Wasi/Apple-mobile or the architecture is Wasm32, and this test context mirrors --targetarch wasm --targetos browser (as its own doc comment states). The flag governs whether Vector<T> stays optimistic and whether explicitly-unsupported ISA markers are emitted — on wasm there is no runtime codegen to fall back to.

Validation

Other tests in that assembly fail on my macOS-arm64 box for an unrelated local reason (DllNotFoundException for clrjit_universal_arm64_arm64 / clrjit_unix_x64_arm64build.sh clr+libs publishes 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.

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
Copilot AI review requested due to automatic review settings July 28, 2026 22:55
@github-actions github-actions Bot added the area-crossgen2-coreclr only use for closed issues label Jul 28, 2026
@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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 pass targetAllowsRuntimeCodeGeneration: false when creating ReadyToRunCompilerContext.
  • Add an inline comment explaining why wasm uses false for runtime code generation.

@lewing
lewing enabled auto-merge (squash) July 29, 2026 00:35
@lewing

lewing commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

/ba-g fast merging to fix build break

@lewing
lewing merged commit 2567c1a into main Jul 29, 2026
94 of 109 checks passed
@lewing
lewing deleted the lewing-fix-r2r-tests-build-break branch July 29, 2026 00:40
@github-actions github-actions Bot mentioned this pull request Jul 29, 2026
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-crossgen2-coreclr only use for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ci-scan] Build break: ILCompiler.ReadyToRun.Tests fails CS7036 on ReadyToRunCompilerContext ctor

3 participants