Skip to content

Commit cf307da

Browse files
[cmake] add -headerpad_max_install_names when building dylibs (#78121)
* add -headerpad_max_install_names when building dylibs * fix formatting of link options
1 parent 55009bf commit cf307da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Runtimes/Core/core/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ if(SwiftCore_ENABLE_VECTOR_TYPES)
265265
"${CMAKE_CURRENT_BINARY_DIR}/SIMDVectorTypes.swift")
266266
endif()
267267

268+
if(APPLE AND BUILD_SHARED_LIBS)
269+
target_link_options(swiftCore PRIVATE "SHELL:-Xlinker -headerpad_max_install_names")
270+
endif()
271+
268272
target_compile_options(swiftCore PRIVATE
269273
$<$<COMPILE_LANGUAGE:Swift>:-parse-stdlib>
270274
$<$<COMPILE_LANGUAGE:Swift>:-nostdimport>

0 commit comments

Comments
 (0)