aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2019-01-29 14:23:34 +0000
committerHans Wennborg <hans@hanshq.net>2019-01-29 14:23:34 +0000
commit5751c2bae7e14a3a90a38a45cb8788c91b694b6e (patch)
tree74038893b233d8f1e8aa6ea12ee46abb3426c60b
parent71b117ec6f77b2da1c234572ce92e336923c3ba6 (diff)
downloadllvm-5751c2bae7e14a3a90a38a45cb8788c91b694b6e.zip
llvm-5751c2bae7e14a3a90a38a45cb8788c91b694b6e.tar.gz
llvm-5751c2bae7e14a3a90a38a45cb8788c91b694b6e.tar.bz2
Merging r352374:
------------------------------------------------------------------------ r352374 | mgorny | 2019-01-28 16:16:03 +0100 (Mon, 28 Jan 2019) | 18 lines [cmake] Fix get_llvm_lit_path() to respect LLVM_EXTERNAL_LIT always Refactor the get_llvm_lit_path() logic to respect LLVM_EXTERNAL_LIT, and require the fallback to be defined explicitly as LLVM_DEFAULT_EXTERNAL_LIT. This fixes building libcxx standalone after r346888. The old logic was using LLVM_EXTERNAL_LIT both as user-defined cache variable and an optional pre-definition of default value from caller (e.g. libcxx). It included a hack to make this work by assigning the value back and forth but it was fragile and stopped working in libcxx. The new logic is simpler and more transparent. Default value is provided in a separate variable, and used only when user-specified variable is empty (i.e. not overriden). Differential Revision: https://reviews.llvm.org/D57282 ------------------------------------------------------------------------ llvm-svn: 352496
-rw-r--r--lldb/cmake/modules/LLDBStandalone.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/cmake/modules/LLDBStandalone.cmake b/lldb/cmake/modules/LLDBStandalone.cmake
index e63b269..a9059dd 100644
--- a/lldb/cmake/modules/LLDBStandalone.cmake
+++ b/lldb/cmake/modules/LLDBStandalone.cmake
@@ -58,7 +58,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to LLVM build tree CMake files")
set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
- set(LLVM_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH "Path to llvm-lit")
+ set(LLVM_DEFAULT_EXTERNAL_LIT ${LLVM_TOOLS_BINARY_DIR}/llvm-lit CACHE PATH "Path to llvm-lit")
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
NO_DEFAULT_PATH)