Skip to content

Commit 291fe21

Browse files
authored
Merge pull request #66385 from bnbarham/pad-install-name
[CMake] Allow install_name_tool to edit pure swift library load paths
2 parents 29672c5 + 7dcebb2 commit 291fe21

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmake/modules/AddPureSwift.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ function(add_pure_swift_host_library name)
141141
set_property(TARGET ${name}
142142
PROPERTY BUILD_WITH_INSTALL_RPATH YES)
143143

144+
if(APSHL_SHARED AND CMAKE_SYSTEM_NAME STREQUAL Darwin)
145+
# Allow install_name_tool to update paths (for rdar://109473564)
146+
set_property(TARGET ${name} APPEND_STRING PROPERTY
147+
LINK_FLAGS " -Xlinker -headerpad_max_install_names")
148+
endif()
149+
144150
# Respect LLVM_COMMON_DEPENDS if it is set.
145151
#
146152
# LLVM_COMMON_DEPENDS if a global variable set in ./lib that provides targets

0 commit comments

Comments
 (0)