File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,19 @@ if (NOT SWIFT_SUPPORTS_DISABLE_IMPLICIT_STRING_PROCESSING_MODULE_IMPORT)
45
45
endif ()
46
46
47
47
# Determine the module triple.
48
- # FIXME: This is a hack. It's all a hack.
48
+ # FIXME: This is a hack. It's all a hack. Windows isn't setting
49
+ # CMAKE_Swift_COMPILER_TARGET.
49
50
if (CMAKE_Swift_COMPILER_TARGET )
50
51
string (REGEX REPLACE "macosx[0-9]+([.][0-9]+)?" "macos" SWIFT_MODULE_TRIPLE
51
52
${CMAKE_Swift_COMPILER_TARGET} )
52
53
elseif ("${CMAKE_SYSTEM_NAME} " STREQUAL "Windows" )
53
- set (SWIFT_MODULE_TRIPLE "${CMAKE_SYSTEM_PROCESSOR} -unknown-windows-msvc" )
54
+ if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64" )
55
+ set (SWIFT_MODULE_TRIPLE "x86_64-unknown-windows-msvc" )
56
+ elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64|arm64" )
57
+ set (SWIFT_MODULE_TRIPLE "aarch64-unknown-windows-msvc" )
58
+ else ()
59
+ message (FATAL_ERROR "Unrecognized architecture for Windows host" )
60
+ endif ()
54
61
endif ()
55
62
56
63
message (STATUS "Module triple: ${SWIFT_MODULE_TRIPLE} " )
You can’t perform that action at this time.
0 commit comments