From fde50dcc814d24478d798f2a55bf72ba355a8e1c Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Fri, 23 Sep 2016 10:59:08 -0700 Subject: [PATCH] [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. --- cmake/modules/AddSwift.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/modules/AddSwift.cmake b/cmake/modules/AddSwift.cmake index 51ea877f55b6e..f50fb756cad29 100644 --- a/cmake/modules/AddSwift.cmake +++ b/cmake/modules/AddSwift.cmake @@ -1199,6 +1199,8 @@ function(add_swift_library name) if(NOT SWIFTLIB_TARGET_LIBRARY) set(SWIFTLIB_INSTALL_IN_COMPONENT dev) + elseif(NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER AND NOT SWIFT_BUILT_STANDALONE) + list(APPEND SWIFTLIB_DEPENDS clang) endif() # If target SDKs are not specified, build for all known SDKs.