[libcxx-commits] [libcxx] eb68a0a - [libc++] Do not try creating llvm-lit when LIBCXX_INCLUDE_TESTS is OFF in the standalone build
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 29 08:55:16 PDT 2020
Author: Louis Dionne
Date: 2020-06-29T11:55:02-04:00
New Revision: eb68a0ab5ee8a8354f1539fb00409f027a7137b2
URL: https://github.com/llvm/llvm-project/commit/eb68a0ab5ee8a8354f1539fb00409f027a7137b2
DIFF: https://github.com/llvm/llvm-project/commit/eb68a0ab5ee8a8354f1539fb00409f027a7137b2.diff
LOG: [libc++] Do not try creating llvm-lit when LIBCXX_INCLUDE_TESTS is OFF in the standalone build
Doing so doesn't work reliably, since it relies on LLVM_* implementation
detail variables being set. Furthermore, since we rely on the lit.site.cfg
being generated, running the tests requires LIBCXX_INCLUDE_TESTS=ON anyway.
Added:
Modified:
libcxx/CMakeLists.txt
Removed:
################################################################################
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 2fdb9b370c4c..9fb4e40a014a 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -916,28 +916,18 @@ if (LIBCXX_INCLUDE_BENCHMARKS)
add_subdirectory(benchmarks)
endif()
-# Create the lit.site.cfg file even when LIBCXX_INCLUDE_TESTS is OFF or
-# LLVM_FOUND is OFF. This allows users to run the tests manually using
-# LIT without requiring a full LLVM checkout.
-#
-# However, since some submission systems strip test/ subdirectories, check for
-# it before adding it.
-
-if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test")
- add_subdirectory(test)
-endif()
if (LIBCXX_INCLUDE_TESTS)
+ add_subdirectory(test)
add_subdirectory(lib/abi)
-endif()
-
-if (LIBCXX_STANDALONE_BUILD AND EXISTS "${LLVM_MAIN_SRC_DIR}/utils/llvm-lit")
- include(AddLLVM) # for get_llvm_lit_path
- # Make sure the llvm-lit script is generated into the bin directory, and do
- # it after adding all tests, since the generated script will only work
- # correctly discovered tests against test locations from the source tree that
- # have already been discovered.
- add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/llvm-lit
- ${CMAKE_CURRENT_BINARY_DIR}/llvm-lit)
+ if (LIBCXX_STANDALONE_BUILD)
+ include(AddLLVM) # for get_llvm_lit_path
+ # Make sure the llvm-lit script is generated into the bin directory, and
+ # do it after adding all tests, since the generated script will only work
+ # correctly discovered tests against test locations from the source tree
+ # that have already been discovered.
+ add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/llvm-lit
+ ${CMAKE_CURRENT_BINARY_DIR}/llvm-lit)
+ endif()
endif()
if (LIBCXX_INCLUDE_DOCS)
More information about the libcxx-commits
mailing list