Remove usage of --src-root with llvm-config

This commit is contained in:
Stephan Lachnit 2023-07-31 23:14:18 +02:00 committed by jenkins
parent 5a58c4f08d
commit 798c565978
2 changed files with 5 additions and 10 deletions

View File

@ -22,8 +22,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
"--bindir" "--bindir"
"--libdir" "--libdir"
"--includedir" "--includedir"
"--prefix" "--prefix")
"--src-root")
execute_process( execute_process(
COMMAND ${CONFIG_COMMAND} COMMAND ${CONFIG_COMMAND}
RESULT_VARIABLE HAD_ERROR RESULT_VARIABLE HAD_ERROR
@ -47,7 +46,6 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
list(GET CONFIG_OUTPUT 2 LIBRARY_DIR) list(GET CONFIG_OUTPUT 2 LIBRARY_DIR)
list(GET CONFIG_OUTPUT 3 INCLUDE_DIR) list(GET CONFIG_OUTPUT 3 INCLUDE_DIR)
list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT) list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT)
list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR)
if(NOT MSVC_IDE) if(NOT MSVC_IDE)
set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS} set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}
@ -60,7 +58,6 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib") set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include") set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree") 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")
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
NO_DEFAULT_PATH) NO_DEFAULT_PATH)

View File

@ -799,8 +799,6 @@ def setup_tests():
exec_subprocess_call("cmake {0}".format(LLVM_OBJ_ROOT), CLING_SRC_DIR) exec_subprocess_call("cmake {0}".format(LLVM_OBJ_ROOT), CLING_SRC_DIR)
exec_subprocess_call("cmake --build . --target FileCheck -- -j{0}".format(multiprocessing.cpu_count()), LLVM_OBJ_ROOT) exec_subprocess_call("cmake --build . --target FileCheck -- -j{0}".format(multiprocessing.cpu_count()), LLVM_OBJ_ROOT)
if not os.path.exists(os.path.join(CLING_SRC_DIR, "..", "clang", "test")): if not os.path.exists(os.path.join(CLING_SRC_DIR, "..", "clang", "test")):
llvm_dir = exec_subprocess_check_output("llvm-config --src-root", ".").strip()
if llvm_dir == "":
if tar_required: if tar_required:
llvm_dir = copy.copy(srcdir) llvm_dir = copy.copy(srcdir)
else: else: