From 798c5659789923fe63b7a7edfa99b5af9300311f Mon Sep 17 00:00:00 2001 From: Stephan Lachnit Date: Mon, 31 Jul 2023 23:14:18 +0200 Subject: [PATCH] Remove usage of --src-root with llvm-config --- CMakeLists.txt | 5 +---- tools/packaging/cpt.py | 10 ++++------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0081c5a..795445f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,8 +22,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) "--bindir" "--libdir" "--includedir" - "--prefix" - "--src-root") + "--prefix") execute_process( COMMAND ${CONFIG_COMMAND} 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 3 INCLUDE_DIR) list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT) - list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR) if(NOT MSVC_IDE) 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_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_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH) diff --git a/tools/packaging/cpt.py b/tools/packaging/cpt.py index b5105e18..e6ee249b 100755 --- a/tools/packaging/cpt.py +++ b/tools/packaging/cpt.py @@ -799,12 +799,10 @@ def setup_tests(): 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) 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: - llvm_dir = copy.copy(srcdir) - else: - llvm_dir = os.path.join("/usr", "lib", "llvm-" + llvm_vers, "build") + if tar_required: + llvm_dir = copy.copy(srcdir) + else: + llvm_dir = os.path.join("/usr", "lib", "llvm-" + llvm_vers, "build") subprocess.Popen( ["sudo mkdir {0}/utils/".format(llvm_dir)], cwd=os.path.join(CLING_SRC_DIR, "tools"),