Skip to content

Commit db0c7fc

Browse files
committed
[Build] When building against musl, add -lfts.
Musl doesn't have fts built-in; it's in a separate library, which we need to add if we're going to use it. rdar://123381867
1 parent b0b6977 commit db0c7fc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/Foundation/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ target_link_libraries(Foundation
164164
uuid
165165
PUBLIC
166166
swiftDispatch)
167+
if("${CMAKE_C_COMPILER_TARGET}" MATCHES ".*-musl[^-*]$")
168+
target_link_libraries(Foundation
169+
PUBLIC
170+
fts)
171+
endif()
167172
set_target_properties(Foundation PROPERTIES
168173
INSTALL_RPATH "$ORIGIN"
169174
BUILD_RPATH "$<TARGET_FILE_DIR:swiftDispatch>"

0 commit comments

Comments
 (0)