Skip to content

Commit 79e0b6a

Browse files
authored
Unconditionally add -z,origin on OpenBSD. (#80897)
This is a little less than ideal, since as I understand it, it only makes sense to add -z,origin when $ORIGIN expansion is required, but doing this surgically per target is rather cumbersome. I don't believe there are any significant drawbacks to doing it unconditionally like this, however.
1 parent e2ee007 commit 79e0b6a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ macro(configure_sdk_unix name architectures)
439439

440440
set(SWIFT_SDK_OPENBSD_ARCH_${arch}_TRIPLE "${arch}-unknown-openbsd${openbsd_system_version}")
441441

442+
add_link_options("LINKER:-z,origin")
443+
442444
if(CMAKE_SYSROOT)
443445
set(SWIFT_SDK_OPENBSD_ARCH_${arch}_PATH "${CMAKE_SYSROOT}${SWIFT_SDK_OPENBSD_ARCH_${arch}_PATH}" CACHE INTERNAL "sysroot path" FORCE)
444446
endif()

0 commit comments

Comments
 (0)