Skip to content

Commit 8499aa0

Browse files
authored
SwiftConfigureSDK.cmake: support freebsd-arm64
1 parent c435405 commit 8499aa0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ macro(configure_sdk_unix name architectures)
378378
message(FATAL_ERROR "unknown arch for ${prefix}: ${arch}")
379379
endif()
380380
elseif("${prefix}" STREQUAL "FREEBSD")
381-
if(NOT arch STREQUAL x86_64)
381+
if(NOT arch MATCHES "(arm64|x86_64)")
382382
message(FATAL_ERROR "unsupported arch for FreeBSD: ${arch}")
383383
endif()
384384

@@ -389,7 +389,7 @@ macro(configure_sdk_unix name architectures)
389389
string(REGEX REPLACE "[-].*" "" freebsd_system_version ${CMAKE_SYSTEM_VERSION})
390390
message(STATUS "FreeBSD Version: ${freebsd_system_version}")
391391

392-
set(SWIFT_SDK_FREEBSD_ARCH_x86_64_TRIPLE "x86_64-unknown-freebsd${freebsd_system_version}")
392+
set(SWIFT_SDK_FREEBSD_ARCH_${arch}_TRIPLE "${arch}-unknown-freebsd${freebsd_system_version}")
393393
elseif("${prefix}" STREQUAL "OPENBSD")
394394
if(NOT arch STREQUAL amd64)
395395
message(FATAL_ERROR "unsupported arch for OpenBSD: ${arch}")

0 commit comments

Comments
 (0)