diff --git a/cmake/modules/AddSwift.cmake b/cmake/modules/AddSwift.cmake index 9977e5a904808..5b8365e930ce8 100644 --- a/cmake/modules/AddSwift.cmake +++ b/cmake/modules/AddSwift.cmake @@ -692,6 +692,8 @@ function(add_swift_host_library name) add_library(${name} ${libkind} ${ASHL_SOURCES}) + target_link_directories(${name} PUBLIC ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) + # Respect LLVM_COMMON_DEPENDS if it is set. # # LLVM_COMMON_DEPENDS if a global variable set in ./lib that provides targets