Skip to content

Commit 953ad09

Browse files
author
Chris Bieneman
committed
[CMake] Fix up an issue encountered in Linux PR testing
This should fix out-of-tree LLDB builds. This patch overrides the output directories setup by llvm_add_library. This is required because swift deviates from the LLVM convention of using the LLVM_*_INTDIR variables. This was causing failures on LLDB's PR testing because LLDB has a terrible mechanism for picking the swift libraries. It finds all the .a files by searching a directory.
1 parent e096d1c commit 953ad09

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,6 +1216,13 @@ function(add_swift_library name)
12161216

12171217
llvm_add_library(${name} ${ARGN})
12181218

1219+
# Override the output directories setup by llvm_add_library. This is required
1220+
# because swift deviates from the LLVM convention of using the LLVM_*_INTDIR
1221+
# variables.
1222+
set_output_directory(${name}
1223+
BINARY_DIR ${SWIFT_RUNTIME_OUTPUT_INTDIR}
1224+
LIBRARY_DIR ${SWIFT_LIBRARY_OUTPUT_INTDIR})
1225+
12191226
swift_install_in_component(dev
12201227
TARGETS ${name}
12211228
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}

0 commit comments

Comments
 (0)