Skip to content

Commit 6fcdde2

Browse files
authored
[runtimes] Allow use of external llvm-lit on standalone builds (#144347)
When creating a standalone build of the runtimes sub-project, the current CMake implementation looks for a lit executable that might potentially exist in the build tree and unconditionally overrides the value of `LLVM_EXTERNAL_LIT`. Due to this, any value passed via `-DLLVM_EXTERNAL_LIT` when configuring the CMake project is ignored. This change adds the `ALLOW_EXTERNAL` argument to the `get_llvm_lit_path` call in the runtimes' CMakeLists.txt, allowing any value previously set to be considered.
1 parent 58c4fa9 commit 6fcdde2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtimes/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ if(LLVM_INCLUDE_TESTS)
259259
# dir rather than ${LLVM_INSTALL_DIR}/bin/llvm-lit (which may not exist if
260260
# LLVM_BINARY_DIR points at an installed LLVM tree rather than a build tree).
261261
set(LLVM_LIT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin)
262-
get_llvm_lit_path(_base_dir _file_name)
262+
get_llvm_lit_path(_base_dir _file_name ALLOW_EXTERNAL)
263263
set(LLVM_EXTERNAL_LIT "${_base_dir}/${_file_name}" CACHE STRING "Command used to spawn lit" FORCE)
264264
# Avoid warning about missing llvm-lit from runtimes CMake files. This is
265265
# fine since we call configure_file() to create llvm-lit at the end of this

0 commit comments

Comments
 (0)