summaryrefslogtreecommitdiff
path: root/libcxxabi/cmake
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-01-17 22:07:09 +0000
committerEric Fiselier <eric@efcs.ca>2018-01-17 22:07:09 +0000
commitf5f93d7b75bb81a35d9d9b6d286d913d35321c42 (patch)
tree6b0274a5d10990d049b050a1a039b3af23282fae /libcxxabi/cmake
parent750b80f7d01ceea58955d86ca42cf4c730d831f0 (diff)
Fix standalone test-suite run.
This patch updates libc++abi's HandleOutOfTreeLLVM.cmake to match libc++'s -- and more importantly, to fix a bug where llvm-lit wasn't found/created when libc++abi was built out-of-tree. This prevented the test suite from running.
Diffstat (limited to 'libcxxabi/cmake')
-rw-r--r--libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake22
1 files changed, 15 insertions, 7 deletions
diff --git a/libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake b/libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake
index 8e742088978..ed0b527a43a 100644
--- a/libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ b/libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -107,14 +107,22 @@ macro(configure_out_of_tree_llvm)
set(LLVM_ENABLE_SPHINX OFF)
endif()
- # Required LIT Configuration ------------------------------------------------
- # Define the default arguments to use with 'lit', and an option for the user
- # to override.
- set(LIT_ARGS_DEFAULT "-sv --show-xfail --show-unsupported")
- if (MSVC OR XCODE)
- set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
+ # In a standalone build, we don't have llvm to automatically generate the
+ # llvm-lit script for us. So we need to provide an explicit directory that
+ # the configurator should write the script into.
+ set(LLVM_LIT_OUTPUT_DIR "${libcxxabi_BINARY_DIR}/bin")
+
+ if (LLVM_INCLUDE_TESTS)
+ # Required LIT Configuration ------------------------------------------------
+ # Define the default arguments to use with 'lit', and an option for the user
+ # to override.
+ set(LLVM_EXTERNAL_LIT "${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py")
+ set(LIT_ARGS_DEFAULT "-sv --show-xfail --show-unsupported")
+ if (MSVC OR XCODE)
+ set(LIT_ARGS_DEFAULT "${LIT_ARGS_DEFAULT} --no-progress-bar")
+ endif()
+ set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")
endif()
- set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")
# Required doc configuration
if (LLVM_ENABLE_SPHINX)