gAlfonso-bit updated this revision to Diff 366014. gAlfonso-bit added a comment.
Rebased CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107717/new/ https://reviews.llvm.org/D107717 Files: clang/CMakeLists.txt clang/lib/Basic/CMakeLists.txt compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake compiler-rt/cmake/Modules/CompilerRTUtils.cmake flang/CMakeLists.txt libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake libunwind/CMakeLists.txt lld/CMakeLists.txt lld/Common/CMakeLists.txt lldb/cmake/modules/LLDBStandalone.cmake lldb/source/CMakeLists.txt llvm/CMakeLists.txt llvm/include/llvm/Support/CMakeLists.txt runtimes/CMakeLists.txt
Index: runtimes/CMakeLists.txt =================================================================== --- runtimes/CMakeLists.txt +++ runtimes/CMakeLists.txt @@ -65,7 +65,7 @@ # This variable makes sure that e.g. llvm-lit is found. set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR}) -set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules) +set(LLVM_CMAKE_DIR ${LLVM_MAIN_SRC_DIR}/cmake/modules) # This variable is used by individual runtimes to locate LLVM files. set(LLVM_PATH ${LLVM_BUILD_MAIN_SRC_DIR}) Index: llvm/include/llvm/Support/CMakeLists.txt =================================================================== --- llvm/include/llvm/Support/CMakeLists.txt +++ llvm/include/llvm/Support/CMakeLists.txt @@ -3,7 +3,7 @@ # The VC revision include that we want to generate. set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSRevision.h") -set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") +set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake") if(LLVM_APPEND_VC_REV) set(llvm_source_dir ${LLVM_MAIN_SRC_DIR}) Index: llvm/CMakeLists.txt =================================================================== --- llvm/CMakeLists.txt +++ llvm/CMakeLists.txt @@ -295,8 +295,8 @@ set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include ) # --includedir set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ) # --prefix -# Note: LLVM_CMAKE_PATH does not include generated files -set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules) +# Note: LLVM_CMAKE_DIR does not include generated files +set(LLVM_CMAKE_DIR ${LLVM_MAIN_SRC_DIR}/cmake/modules) set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples) set(LLVM_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include) Index: lldb/source/CMakeLists.txt =================================================================== --- lldb/source/CMakeLists.txt +++ lldb/source/CMakeLists.txt @@ -8,7 +8,7 @@ find_first_existing_vc_file("${LLDB_SOURCE_DIR}" lldb_vc) set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc") -set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") +set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake") if(lldb_vc AND LLVM_APPEND_VC_REV) set(lldb_source_dir ${LLDB_SOURCE_DIR}) Index: lldb/cmake/modules/LLDBStandalone.cmake =================================================================== --- lldb/cmake/modules/LLDBStandalone.cmake +++ lldb/cmake/modules/LLDBStandalone.cmake @@ -3,8 +3,8 @@ find_package(LLVM REQUIRED CONFIG HINTS ${LLVM_DIR} NO_CMAKE_FIND_ROOT_PATH) find_package(Clang REQUIRED CONFIG HINTS ${Clang_DIR} ${LLVM_DIR}/../clang NO_CMAKE_FIND_ROOT_PATH) -# We set LLVM_CMAKE_PATH so that GetSVN.cmake is found correctly when building SVNVersion.inc -set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake modules") +# We set LLVM_CMAKE_DIR so that GetSVN.cmake is found correctly when building SVNVersion.inc +set(LLVM_CMAKE_DIR ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake modules") set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_INCLUDE_DIR} CACHE PATH "Path to llvm/include") Index: lld/Common/CMakeLists.txt =================================================================== --- lld/Common/CMakeLists.txt +++ lld/Common/CMakeLists.txt @@ -8,7 +8,7 @@ find_first_existing_vc_file("${LLD_SOURCE_DIR}" lld_vc) set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc") -set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") +set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake") if(lld_vc AND LLVM_APPEND_VC_REV) set(lld_source_dir ${LLD_SOURCE_DIR}) Index: lld/CMakeLists.txt =================================================================== --- lld/CMakeLists.txt +++ lld/CMakeLists.txt @@ -27,7 +27,7 @@ list(GET LLVM_CONFIG_OUTPUT 0 OBJ_ROOT) list(GET LLVM_CONFIG_OUTPUT 1 MAIN_INCLUDE_DIR) - list(GET LLVM_CONFIG_OUTPUT 2 LLVM_CMAKE_PATH) + list(GET LLVM_CONFIG_OUTPUT 2 LLVM_CMAKE_DIR) list(GET LLVM_CONFIG_OUTPUT 3 MAIN_SRC_DIR) set(LLVM_OBJ_ROOT ${OBJ_ROOT} CACHE PATH "path to LLVM build tree") @@ -35,14 +35,14 @@ set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") file(TO_CMAKE_PATH ${LLVM_OBJ_ROOT} LLVM_BINARY_DIR) - file(TO_CMAKE_PATH ${LLVM_CMAKE_PATH} LLVM_CMAKE_PATH) + file(TO_CMAKE_PATH ${LLVM_CMAKE_DIR} LLVM_CMAKE_DIR) - if(NOT EXISTS "${LLVM_CMAKE_PATH}/LLVMConfig.cmake") + if(NOT EXISTS "${LLVM_CMAKE_DIR}/LLVMConfig.cmake") message(FATAL_ERROR "LLVMConfig.cmake not found") endif() - include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake") + include("${LLVM_CMAKE_DIR}/LLVMConfig.cmake") - list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") + list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}") set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") include_directories("${LLVM_BINARY_DIR}/include" ${LLVM_INCLUDE_DIRS}) Index: libunwind/CMakeLists.txt =================================================================== --- libunwind/CMakeLists.txt +++ libunwind/CMakeLists.txt @@ -343,6 +343,6 @@ add_subdirectory(docs) endif() -if (LIBUNWIND_INCLUDE_TESTS AND EXISTS ${LLVM_CMAKE_PATH}) +if (LIBUNWIND_INCLUDE_TESTS AND EXISTS ${LLVM_CMAKE_DIR}) add_subdirectory(test) endif() Index: libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake =================================================================== --- libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake +++ libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake @@ -13,14 +13,14 @@ set(LLVM_INCLUDE_DIR ${LLVM_PATH}/include CACHE PATH "Path to llvm/include") set(LLVM_PATH ${LLVM_PATH} CACHE PATH "Path to LLVM source tree") set(LLVM_MAIN_SRC_DIR ${LLVM_PATH}) -set(LLVM_CMAKE_PATH "${LLVM_PATH}/cmake/modules") +set(LLVM_CMAKE_DIR "${LLVM_PATH}/cmake/modules") -if (EXISTS "${LLVM_CMAKE_PATH}") - list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") +if (EXISTS "${LLVM_CMAKE_DIR}") + list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}") elseif (EXISTS "${LLVM_MAIN_SRC_DIR}/cmake/modules") list(APPEND CMAKE_MODULE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules") else() - message(FATAL_ERROR "Neither ${LLVM_CMAKE_PATH} nor ${LLVM_MAIN_SRC_DIR}/cmake/modules found. " + message(FATAL_ERROR "Neither ${LLVM_CMAKE_DIR} nor ${LLVM_MAIN_SRC_DIR}/cmake/modules found. " "This is not a supported configuration.") endif() Index: flang/CMakeLists.txt =================================================================== --- flang/CMakeLists.txt +++ flang/CMakeLists.txt @@ -35,7 +35,7 @@ endif() # We need a pre-built/installed version of LLVM. - find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_PATH}") + find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}") # If the user specifies a relative path to LLVM_DIR, the calls to include # LLVM modules fail. Append the absolute path to LLVM_DIR instead. get_filename_component(LLVM_DIR_ABSOLUTE ${LLVM_DIR} REALPATH) Index: compiler-rt/cmake/Modules/CompilerRTUtils.cmake =================================================================== --- compiler-rt/cmake/Modules/CompilerRTUtils.cmake +++ compiler-rt/cmake/Modules/CompilerRTUtils.cmake @@ -289,7 +289,7 @@ "You are not using the monorepo layout. This configuration is DEPRECATED.") endif() - set(FOUND_LLVM_CMAKE_PATH FALSE) + set(FOUND_LLVM_CMAKE_DIR FALSE) if (LLVM_CONFIG_PATH) execute_process( COMMAND ${LLVM_CONFIG_PATH} "--obj-root" "--bindir" "--libdir" "--src-root" "--includedir" @@ -372,21 +372,21 @@ RESULT_VARIABLE HAD_ERROR OUTPUT_VARIABLE CONFIG_OUTPUT) if(NOT HAD_ERROR) - string(STRIP "${CONFIG_OUTPUT}" LLVM_CMAKE_PATH_FROM_LLVM_CONFIG) - file(TO_CMAKE_PATH ${LLVM_CMAKE_PATH_FROM_LLVM_CONFIG} LLVM_CMAKE_PATH) + string(STRIP "${CONFIG_OUTPUT}" LLVM_CMAKE_DIR_FROM_LLVM_CONFIG) + file(TO_CMAKE_PATH ${LLVM_CMAKE_DIR_FROM_LLVM_CONFIG} LLVM_CMAKE_DIR) else() file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE) - set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR_CMAKE_STYLE}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") + set(LLVM_CMAKE_DIR "${LLVM_BINARY_DIR_CMAKE_STYLE}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") endif() - set(LLVM_CMAKE_INCLUDE_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake") + set(LLVM_CMAKE_INCLUDE_FILE "${LLVM_CMAKE_DIR}/LLVMConfig.cmake") if (EXISTS "${LLVM_CMAKE_INCLUDE_FILE}") - list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") + list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}") # Get some LLVM variables from LLVMConfig. include("${LLVM_CMAKE_INCLUDE_FILE}") - set(FOUND_LLVM_CMAKE_PATH TRUE) + set(FOUND_LLVM_CMAKE_DIR TRUE) else() - set(FOUND_LLVM_CMAKE_PATH FALSE) + set(FOUND_LLVM_CMAKE_DIR FALSE) message(WARNING "LLVM CMake path (${LLVM_CMAKE_INCLUDE_FILE}) reported by llvm-config does not exist") endif() unset(LLVM_CMAKE_INCLUDE_FILE) @@ -409,7 +409,7 @@ "This will be treated as error in the future.") endif() - if (NOT FOUND_LLVM_CMAKE_PATH) + if (NOT FOUND_LLVM_CMAKE_DIR) # This configuration tries to configure without the prescence of `LLVMConfig.cmake`. It is # intended for testing purposes (generating the lit test suites) and will likely not support # a build of the runtimes in compiler-rt. Index: compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake =================================================================== --- compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake +++ compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake @@ -13,13 +13,13 @@ endmacro() macro(compiler_rt_mock_llvm_cmake_config_set_cmake_path) - # Point `LLVM_CMAKE_PATH` at the source tree in the monorepo. - set(LLVM_CMAKE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules") - if (NOT EXISTS "${LLVM_CMAKE_PATH}") - message(FATAL_ERROR "LLVM_CMAKE_PATH (${LLVM_CMAKE_PATH}) does not exist") + # Point `LLVM_CMAKE_DIR` at the source tree in the monorepo. + set(LLVM_CMAKE_DIR "${LLVM_MAIN_SRC_DIR}/cmake/modules") + if (NOT EXISTS "${LLVM_CMAKE_DIR}") + message(FATAL_ERROR "LLVM_CMAKE_DIR (${LLVM_CMAKE_DIR}) does not exist") endif() - list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") - message(STATUS "LLVM_CMAKE_PATH: \"${LLVM_CMAKE_PATH}\"") + list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}") + message(STATUS "LLVM_CMAKE_DIR: \"${LLVM_CMAKE_DIR}\"") endmacro() function(compiler_rt_mock_llvm_cmake_config_set_target_triple) @@ -71,5 +71,5 @@ macro(compiler_rt_mock_llvm_cmake_config_include_cmake_files) # Some compiler-rt CMake code needs to call code in this file. - include("${LLVM_CMAKE_PATH}/AddLLVM.cmake") + include("${LLVM_CMAKE_DIR}/AddLLVM.cmake") endmacro() Index: clang/lib/Basic/CMakeLists.txt =================================================================== --- clang/lib/Basic/CMakeLists.txt +++ clang/lib/Basic/CMakeLists.txt @@ -8,7 +8,7 @@ # The VC revision include that we want to generate. set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc") -set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake") +set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake") if(llvm_vc AND LLVM_APPEND_VC_REV) set(llvm_source_dir ${LLVM_MAIN_SRC_DIR}) Index: clang/CMakeLists.txt =================================================================== --- clang/CMakeLists.txt +++ clang/CMakeLists.txt @@ -48,11 +48,11 @@ list(GET CONFIG_OUTPUT 3 INCLUDE_DIR) list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT) list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR) - list(GET CONFIG_OUTPUT 6 LLVM_CONFIG_CMAKE_PATH) + list(GET CONFIG_OUTPUT 6 LLVM_CONFIG_CMAKE_DIR) - # Normalize LLVM_CMAKE_PATH. --cmakedir might contain backslashes. + # Normalize LLVM_CMAKE_DIR. --cmakedir might contain backslashes. # CMake assumes slashes as PATH. - file(TO_CMAKE_PATH ${LLVM_CONFIG_CMAKE_PATH} LLVM_CMAKE_PATH) + file(TO_CMAKE_PATH ${LLVM_CONFIG_CMAKE_DIR} LLVM_CMAKE_DIR) endif() @@ -63,7 +63,7 @@ mark_as_advanced(LLVM_ENABLE_ASSERTIONS) endif() - find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_PATH}") + find_package(LLVM REQUIRED HINTS "${LLVM_CMAKE_DIR}") list(APPEND CMAKE_MODULE_PATH ${LLVM_DIR}) # We can't check LLVM_CONFIG here, because find_package(LLVM ...) also sets @@ -75,11 +75,6 @@ set(LIBRARY_DIR ${LLVM_LIBRARY_DIR}) set(INCLUDE_DIR ${LLVM_INCLUDE_DIR}) set(LLVM_OBJ_DIR ${LLVM_BINARY_DIR}) - # The LLVM_CMAKE_PATH variable is set when doing non-standalone builds and - # used in this project, so we need to make sure we set this value. - # FIXME: LLVM_CMAKE_DIR comes from LLVMConfig.cmake. We should rename - # LLVM_CMAKE_PATH to LLVM_CMAKE_DIR throughout the project. - set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR}) endif() set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits