Skip to content

Commit fde50dc

Browse files
author
Chris Bieneman
committed
[CMake] Swift target libraries should depend on clang in non-standalone builds
When building non-standalone and using the in-tree clang all TARGET_LIBRARIES should depend on clang. This ensures clang is built before the build tries to use it.
1 parent ba2f720 commit fde50dc

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
@@ -1199,6 +1199,8 @@ function(add_swift_library name)
11991199

12001200
if(NOT SWIFTLIB_TARGET_LIBRARY)
12011201
set(SWIFTLIB_INSTALL_IN_COMPONENT dev)
1202+
elseif(NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER AND NOT SWIFT_BUILT_STANDALONE)
1203+
list(APPEND SWIFTLIB_DEPENDS clang)
12021204
endif()
12031205

12041206
# If target SDKs are not specified, build for all known SDKs.

0 commit comments

Comments
 (0)