Skip to content

[wasm] The SDK's crossgen2 targets ignore PublishReadyToRunInstructionSet #137571

Closed

Description

@lewing

#137112 adds PublishReadyToRunInstructionSet, which maps to crossgen2's --instruction-set: in dotnet/runtime's copy of the crossgen2 targets (src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets). Builds inside dotnet/runtime import that copy. App publishes use the SDK's own Microsoft.NET.CrossGen.targets, which doesn't map the property yet, so it's silently ignored:

  • Browser CoreCLR: opting in with PublishReadyToRunInstructionSet=relaxed-simd has no effect, and RelaxedSimd.IsSupported stays false.
  • WASI CoreCLR: opting out with PublishReadyToRunInstructionSet=-relaxed-simd has no effect. Relaxed SIMD itself stays on by default, because that default comes from crossgen2.

Wasm.Build.Tests.WasmSIMDTests.PublishRelaxedSimdEnabledCoreClr covers the browser opt-in against the real SDK. It's disabled against this issue; the opt-out case, PublishRelaxedSimdCoreClr, still runs.

Fix: add the same mapping to dotnet/sdk's Microsoft.NET.CrossGen.targets:

<PublishReadyToRunCrossgen2ExtraArgs Condition="'$(PublishReadyToRunInstructionSet)' != ''">$(PublishReadyToRunCrossgen2ExtraArgs);--instruction-set:$(PublishReadyToRunInstructionSet)</PublishReadyToRunCrossgen2ExtraArgs>

Re-enable PublishRelaxedSimdEnabledCoreClr once an SDK with that change is the one Wasm.Build.Tests uses.

Note

This issue was generated with GitHub Copilot.

Activity

  1. added
    arch-wasm
    on Nov 15, 2026
  2. dotnet-policy-service commented on Nov 15, 2026

    @dotnet-policy-service
    Contributor

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

  3. added
    untriaged
    on Nov 15, 2026
  4. dotnet-policy-service commented on Nov 15, 2026

    @dotnet-policy-service
    Contributor

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

  5. changed the title [-][wasm] Remove the PublishReadyToRunInstructionSet fallback targets once the SDK maps the property[/-] [+][wasm] The SDK's crossgen2 targets ignore PublishReadyToRunInstructionSet[/+] on Nov 15, 2026
  6. added this to the 12.0.0 milestone on Nov 15, 2026
  7. removed
    untriaged
    on Nov 15, 2026
  8. self-assigned this
    on Nov 15, 2026
  9. lewing commented on Nov 15, 2026

    @lewing
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-ReadyToRun

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions