Skip to content

Commit 2f9f585

Browse files
committed
build: special case Windows ARM target
Windows ARM NT (the modern, non-Windows CE environment) is a pure thumb2 environment. The frontend does not canonicalise the target like in clang. Ensure that we map the triple by hand to the desired target triple.
1 parent 6500e76 commit 2f9f585

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,13 @@ macro(configure_sdk_windows prefix sdk_name environment architectures)
179179
set(SWIFT_SDK_${prefix}_OBJECT_FORMAT "COFF")
180180

181181
foreach(arch ${architectures})
182-
set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE
183-
"${arch}-unknown-windows-${environment}")
182+
if(arch STREQUAL armv7)
183+
set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE
184+
"thumbv7-unknown-windows-${environment}")
185+
else()
186+
set(SWIFT_SDK_${prefix}_ARCH_${arch}_TRIPLE
187+
"${arch}-unknown-windows-${environment}")
188+
endif()
184189
endforeach()
185190

186191
# Add this to the list of known SDKs.

0 commit comments

Comments
 (0)