Skip to content

Commit 8d2d1fc

Browse files
authored
Merge pull request #79103 from michael-yuji/fbsd-remove-version
Remove FreeBSD version from swiftmodule triple
2 parents 1cc04c8 + c6d9efa commit 8d2d1fc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cmake/modules/SwiftConfigureSDK.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ macro(configure_sdk_unix name architectures)
427427
string(REGEX REPLACE "[-].*" "" freebsd_system_version ${CMAKE_SYSTEM_VERSION})
428428
message(STATUS "FreeBSD Version: ${freebsd_system_version}")
429429

430-
set(SWIFT_SDK_FREEBSD_ARCH_${arch}_TRIPLE "${arch}-unknown-freebsd${freebsd_system_version}")
430+
set(SWIFT_SDK_FREEBSD_ARCH_${arch}_TRIPLE "${arch}-unknown-freebsd")
431431
elseif("${prefix}" STREQUAL "OPENBSD")
432432
if(NOT arch STREQUAL "x86_64" AND NOT arch STREQUAL "aarch64")
433433
message(FATAL_ERROR "unsupported arch for OpenBSD: ${arch}")

lib/Basic/Platform.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,10 @@ llvm::Triple swift::getTargetSpecificModuleTriple(const llvm::Triple &triple) {
414414
triple.getOSName(), environment);
415415
}
416416

417+
if (triple.isOSFreeBSD()) {
418+
return swift::getUnversionedTriple(triple);
419+
}
420+
417421
// Other platforms get no normalization.
418422
return triple;
419423
}

0 commit comments

Comments
 (0)