Skip to content

Commit fd2ba8b

Browse files
committed
Fix the ARM architecture on FreeBSD
The 64-bit ARM architecture spelling on FreeBSD is aarch64, not arm64. This results in a build failure about a missing `freebsd/arm64/swiftrt.o` while building the runtimes.
1 parent 9993d29 commit fd2ba8b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ macro(configure_sdk_unix name architectures)
417417
message(FATAL_ERROR "unknown arch for ${prefix}: ${arch}")
418418
endif()
419419
elseif("${prefix}" STREQUAL "FREEBSD")
420-
if(NOT arch MATCHES "(arm64|x86_64)")
420+
if(NOT arch MATCHES "(aarch64|x86_64)")
421421
message(FATAL_ERROR "unsupported arch for FreeBSD: ${arch}")
422422
endif()
423423

utils/build-script-impl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ function should_execute_host_actions_for_phase() {
461461
function verify_host_is_supported() {
462462
local host="$1"
463463
case ${host} in
464-
freebsd-arm64 \
464+
freebsd-aarch64 \
465465
| freebsd-x86_64 \
466466
| openbsd-x86_64 \
467467
| openbsd-aarch64 \

utils/swift_build_support/swift_build_support/targets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class StdlibDeploymentTarget(object):
290290
"riscv64",
291291
"s390x"])
292292

293-
FreeBSD = Platform("freebsd", archs=["x86_64", "arm64"])
293+
FreeBSD = Platform("freebsd", archs=["x86_64", "aarch64"])
294294

295295
LinuxStatic = Platform('linux-static', sdk_name='LINUX_STATIC', archs=[
296296
'x86_64',
@@ -399,7 +399,7 @@ def host_target():
399399
if machine == 'amd64':
400400
return StdlibDeploymentTarget.FreeBSD.x86_64
401401
elif machine == 'arm64':
402-
return StdlibDeploymentTarget.FreeBSD.arm64
402+
return StdlibDeploymentTarget.FreeBSD.aarch64
403403

404404
elif system == 'OpenBSD':
405405
if machine == 'amd64':

0 commit comments

Comments
 (0)