llvm.org GIT mirror llvm / 33a23da
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352374 91177308-0d34-0410-b5e6-96231b3b80d8 Michal Gorny 8 months ago
1 changed file(s) with 0 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
12791279 cmake_parse_arguments(ARG "ALLOW_EXTERNAL" "" "" ${ARGN})
12801280
12811281 if (ARG_ALLOW_EXTERNAL)
1282 set(LLVM_DEFAULT_EXTERNAL_LIT "${LLVM_EXTERNAL_LIT}")
12831282 set (LLVM_EXTERNAL_LIT "" CACHE STRING "Command used to spawn lit")
12841283 if ("${LLVM_EXTERNAL_LIT}" STREQUAL "")
12851284 set(LLVM_EXTERNAL_LIT "${LLVM_DEFAULT_EXTERNAL_LIT}")