Skip to content

Windows arm64 build: any -cmakeargs breaks the x64 cross-components build #135468

Closed

Description

@pcshrosbree

On a Windows arm64 build, passing any -cmakeargs breaks the x64 cross-components build:

build.cmd clr.runtime -a arm64 -c Debug -cmakeargs -DCLR_PROBE_NOOP=1

artifacts\obj\coreclr\windows.arm64.Debug\x64\debug\di\floatconversion.asm(2748) : error A2008:syntax error : GBLA

The same command without -cmakeargs builds. CLR_PROBE_NOOP is a name nothing reads; -DFEATURE_CORPROFILER=0 fails the same way.

After the failure, x64\CMakeCache.txt has one fused entry, CLR_PROBE_NOOP:UNINITIALIZED=1 -DCLR_CROSS_COMPONENTS_BUILD=1, and no CLR_CROSS_COMPONENTS_BUILD entry of its own. So the cross-components sub-build configures as a full arm64 build and assembles arm64 sources with ml64.

Cause: eng/Subsets.props (lines 421, 462, 475) appends the flag with a space, CMakeArgs=$(CMakeArgs) -DCLR_CROSS_COMPONENTS_BUILD=1, and src/coreclr/runtime.proj (lines 25-26) turns each _CMakeArgs item into one quoted -cmakeargs "...". With an empty CMakeArgs the leading space is harmless; with a user value, both definitions end up in a single argument.

Splitting in runtime.proj with $([MSBuild]::Unescape($(CMakeArgs.Replace(' ', ';')))) makes the build pass (both definitions then appear as separate cache entries), but it would break a CMake argument that contains a space, so it is a workaround rather than a fix.

Reproduced on a fresh obj dir at ef6ca45 (#135377's head); both files are identical on main (98a24e3).

Activity

  1. dotnet-policy-service commented on Oct 9, 2026

    @dotnet-policy-service
    Contributor

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

  2. added a commit that references this issue on Oct 9, 2026
    0b870f9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions