Skip to content

Commit 5e3ba59

Browse files
authored
Merge pull request #66655 from apple/maxd/bsi-bsd-arm64
build-script-impl: add support for `freebsd-arm64`
2 parents dc0a3c9 + 8499aa0 commit 5e3ba59

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cmake/modules/SwiftConfigureSDK.cmake

+2-2
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}")

utils/build-script-impl

+2-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,8 @@ function should_execute_host_actions_for_phase() {
452452
function verify_host_is_supported() {
453453
local host="$1"
454454
case ${host} in
455-
freebsd-x86_64 \
455+
freebsd-arm64 \
456+
| freebsd-x86_64 \
456457
| openbsd-amd64 \
457458
| cygwin-x86_64 \
458459
| haiku-x86_64 \

0 commit comments

Comments
 (0)