Remove usage of --src-root with llvm-config
This commit is contained in:
parent
5a58c4f08d
commit
798c565978
@ -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)
|
||||
|
@ -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"),
|
||||
|
Loading…
Reference in New Issue
Block a user