[Lldb-commits] [lldb] r337291 - [CMake] Have check-lldb-unit use CMAKE_CURRENT_BINARY_DIR

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 17 08:11:15 PDT 2018

Author: jdevlieghere
Date: Tue Jul 17 08:11:15 2018
New Revision: 337291

URL: http://llvm.org/viewvc/llvm-project?rev=337291&view=rev
[CMake] Have check-lldb-unit use CMAKE_CURRENT_BINARY_DIR

llvm-lit uses `map_config` directives (generated at configuration-time) to
make it possible to pass a test path relative to the source instead of
the build folder (CMAKE_CURRENT_BINARY_DIR).

However, this doesn't work in the case of swift where the build
directory layout prevents llvm-lit from knowing about lldb and its test
paths. This caused check-lldb-unit to fail in this configuration, while
everything was working as expected upstream. This patch fixes the issue
by passing a path relative to the build directory. This was already the
case for check-lldb-lit.


Modified: lldb/trunk/lit/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/CMakeLists.txt?rev=337291&r1=337290&r2=337291&view=diff
--- lldb/trunk/lit/CMakeLists.txt (original)
+++ lldb/trunk/lit/CMakeLists.txt Tue Jul 17 08:11:15 2018
@@ -73,7 +73,7 @@ set(LLDB_TEST_PARAMS
 add_lit_testsuite(check-lldb-lit "Running lldb lit test suite"
   PARAMS lldb_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
-       lldb_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
+         lldb_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
@@ -85,7 +85,8 @@ if (TARGET clang)
   add_dependencies(check-lldb-lit clang)
-add_lit_testsuites(LLDB ${CMAKE_CURRENT_SOURCE_DIR}
   PARAMS lldb_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg

More information about the lldb-commits mailing list