Skip to content

Commit 4827ed7

Browse files
committed
Add explanation about the change
1 parent 61a8e72 commit 4827ed7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,8 @@ function(_add_swift_library_single target name)
12611261
"${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFTLIB_SINGLE_SUBDIR}"
12621262
"${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/../lib/swift/${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_LIB_SUBDIR}")
12631263

1264+
# There are scenarios in which this function is called with SDKROOT set
1265+
# In those we need to ensure we link against the dylibs present in the SDK
12641266
if(DEFINED ENV{SDKROOT})
12651267
list(APPEND library_search_directories "$ENV{SDKROOT}/usr/lib/swift")
12661268
endif()

0 commit comments

Comments
 (0)