swiftlang / swift-corelibs-libdispatch

The libdispatch Project, (a.k.a. Grand Central Dispatch), for concurrency on multicore hardware
swift.org
Apache License 2.0
2.47k stars 460 forks source link

Fix Windows ARM64 Detection #803

Closed hmelder closed 9 months ago

hmelder commented 11 months ago

CMAKE_SYSTEM_PROCESSOR returns ARM64 and not aarch64 (cmake version 3.27.9).

systeminfo:

OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22598 N/A Build 22598
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
System Type:               ARM64-based PC
triplef commented 11 months ago

Would there be a simple way to also support cross-compiling on Windows using the respective VS environments e.g. by looking at the VSCMD_ARG_TGT_ARCH env var instead of CMAKE_SYSTEM_PROCESSOR? Not sure what’s the common CMake thing to do on Windows, but personally I would expect it to build for whatever VS environment I am using.

hmelder commented 9 months ago

@compnerd Given the previous use of OR instead of MATCHES how should I move on with this?

compnerd commented 9 months ago

Eh, I suppose that it is fine as is.

compnerd commented 9 months ago

@swift-ci please test

compnerd commented 9 months ago

Hmm, actually, is this still needed after #812?

hmelder commented 9 months ago

Hmm, actually, is this still needed after https://github.com/apple/swift-corelibs-libdispatch/pull/812?

Nope