Skip to content

Commit 4e893ec

Browse files
authored
Merge pull request #22832 from Rostepher/dyld-compatibility-version-5.0
[Build System: CMake] Always set the dyld compatibility_version of linked dylibs on Darwin platforms (5.0).
2 parents a8126fb + 252ac2b commit 4e893ec

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -753,9 +753,10 @@ function(_add_swift_library_single target name)
753753
endif()
754754
endif()
755755

756-
if (SWIFT_COMPILER_VERSION)
757-
if(${SWIFTLIB_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
758-
list(APPEND SWIFTLIB_SINGLE_LINK_FLAGS "-Xlinker" "-current_version" "-Xlinker" "${SWIFT_COMPILER_VERSION}" "-Xlinker" "-compatibility_version" "-Xlinker" "1")
756+
if(${SWIFTLIB_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
757+
list(APPEND SWIFTLIB_SINGLE_LINK_FLAGS "-Xlinker" "-compatibility_version" "-Xlinker" "1")
758+
if (SWIFT_COMPILER_VERSION)
759+
list(APPEND SWIFTLIB_SINGLE_LINK_FLAGS "-Xlinker" "-current_version" "-Xlinker" "${SWIFT_COMPILER_VERSION}" )
759760
endif()
760761
endif()
761762

0 commit comments

Comments
 (0)