[lldb] [cmake] Add LLVM_LIT_ARGS override support for standalone builds

Add a LLVM_LIT_ARGS cached variable in order to make it possible
to override lit arguments when doing standalone builds.  Without that,
the user variable is ignored and the default options are always used.

Based on a similar solution found in clang.

Differential Revision: https://reviews.llvm.org/D107700
This commit is contained in:
Michał Górny 2021-08-07 22:06:20 +02:00
parent ba06ac8b45
commit 614c7d0387
1 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,8 @@ set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR} CACHE PATH "Path to LLVM source
set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_INCLUDE_DIR} CACHE PATH "Path to llvm/include")
set(LLVM_BINARY_DIR ${LLVM_BINARY_DIR} CACHE PATH "Path to LLVM build tree")
set(LLVM_LIT_ARGS "-sv" CACHE STRING "Default options for lit")
set(lit_file_name "llvm-lit")
if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
set(lit_file_name "${lit_file_name}.py")