File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -995,7 +995,7 @@ function(add_swift_host_tool executable)
995995 endif ()
996996
997997 # Opt-out of OpenBSD BTCFI if instructed where it is enforced by default.
998- if (SWIFT_HOST_VARIANT_SDK STREQUAL "OPENBSD" AND SWIFT_HOST_VARIANT_ARCH STREQUAL "aarch64" AND NOT SWIFT_OPENBSD_BTCFI)
998+ if (SWIFT_HOST_VARIANT_SDK STREQUAL "OPENBSD" AND SWIFT_HOST_VARIANT_ARCH MATCHES "aarch64|x86_64 " AND NOT SWIFT_OPENBSD_BTCFI)
999999 target_link_options (${executable} PRIVATE "LINKER:-z,nobtcfi" )
10001000 endif ()
10011001
Original file line number Diff line number Diff line change @@ -150,7 +150,10 @@ bool swift::tripleRequiresRPathForSwiftLibrariesInOS(
150150}
151151
152152bool swift::tripleBTCFIByDefaultInOpenBSD (const llvm::Triple &triple) {
153- return triple.isOSOpenBSD () && triple.getArch () == llvm::Triple::aarch64;
153+ return triple.isOSOpenBSD () && (
154+ triple.getArch () == llvm::Triple::aarch64 ||
155+ triple.getArch () == llvm::Triple::x86_64);
156+
154157}
155158
156159DarwinPlatformKind swift::getDarwinPlatformKind (const llvm::Triple &triple) {
You can’t perform that action at this time.
0 commit comments