Windows: Detect both ARM64 and ARM64EC with Clang -marm64x flag

Both architectures appear in object files, so add both of them to
`CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID` too.  We already do this for
multiple `CMAKE_OSX_ARCHITECTURES` on Apple platforms.

Fixes: #28067
This commit is contained in:
Brad King
2026-09-01 17:47:27 -04:00
parent b56fabdb46
commit ea378e104d
2 changed files with 9 additions and 3 deletions
@@ -6,8 +6,13 @@ CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID
:ref:`List <CMake Language Lists>` of identifiers indicating the
target architecture(s) of the compiler for language ``<LANG>``.
Typically the list has one entry unless :variable:`CMAKE_OSX_ARCHITECTURES`
lists multiple architectures.
Typically the list has one entry unless the compiler stores multiple
architectures in each object file. For example:
* The build targets an Apple platform with
:variable:`CMAKE_OSX_ARCHITECTURES` listing multiple architectures.
* The build targets Windows ARM64 with the MSVC ABI using Clang with
the ``-marm64x`` flag.
Possible values for each platform are documented in the following sections.