aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2019-01-29 14:23:17 +0000
committerHans Wennborg <hans@hanshq.net>2019-01-29 14:23:17 +0000
commit71b117ec6f77b2da1c234572ce92e336923c3ba6 (patch)
treec84e045861c82f72eef3560b6851263c988bbde6
parent84d97e30428dfcbdac11b909094226f6bde2d521 (diff)
downloadllvm-71b117ec6f77b2da1c234572ce92e336923c3ba6.zip
llvm-71b117ec6f77b2da1c234572ce92e336923c3ba6.tar.gz
llvm-71b117ec6f77b2da1c234572ce92e336923c3ba6.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: 352495
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake1
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 4dbc0dd..0df6845 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -1280,7 +1280,6 @@ function(get_llvm_lit_path base_dir file_name)
cmake_parse_arguments(ARG "ALLOW_EXTERNAL" "" "" ${ARGN})
if (ARG_ALLOW_EXTERNAL)
- set(LLVM_DEFAULT_EXTERNAL_LIT "${LLVM_EXTERNAL_LIT}")
set (LLVM_EXTERNAL_LIT "" CACHE STRING "Command used to spawn lit")
if ("${LLVM_EXTERNAL_LIT}" STREQUAL "")
set(LLVM_EXTERNAL_LIT "${LLVM_DEFAULT_EXTERNAL_LIT}")