[LLVM] update to 15.0.7 (#30510)

* [llvm] Update port to 15.0.1

The patchset is rebased onto llvmorg-15.0.1, with some significant
differences especially around install paths. The NixOS project
appears to be midway through a large change to the install path
mechanics, for the same purpose as this patchset.

When that has landed, it looks like most of these patches can go away.

* [llvm] x-add-version for 15.0.1

* [llvm] Add enable-ios feature flag

This passes straight through to COMPILER_RT_ENABLE_IOS, which is
defaulted to ON in LLVM. This is a problem if your build host
doesn't have the iOS SDK installed, such as on vcpkg CI.

Co-authored-by: Josh Channings <josh@channings.me.uk>
This commit is contained in:
Alexander Neumann 2023-04-12 08:20:09 +02:00 committed by GitHub
parent b81b6e497a
commit 203383666e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 343 additions and 252 deletions

View File

@ -0,0 +1,208 @@
clang/cmake/modules/CMakeLists.txt | 4 ++--
clang/utils/hmaptool/CMakeLists.txt | 2 +-
compiler-rt/cmake/Modules/CompilerRTUtils.cmake | 2 +-
flang/cmake/modules/CMakeLists.txt | 4 ++--
lld/cmake/modules/CMakeLists.txt | 4 ++--
llvm/CMakeLists.txt | 2 +-
llvm/cmake/modules/AddLLVM.cmake | 2 +-
llvm/cmake/modules/CMakeLists.txt | 2 +-
mlir/cmake/modules/CMakeLists.txt | 8 ++++----
mlir/test/CMakeLists.txt | 2 +-
openmp/tools/Modules/CMakeLists.txt | 2 +-
polly/cmake/CMakeLists.txt | 8 ++++----
12 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/clang/cmake/modules/CMakeLists.txt b/clang/cmake/modules/CMakeLists.txt
index 6a7fa2fa27eb..a17f807ab155 100644
--- a/clang/cmake/modules/CMakeLists.txt
+++ b/clang/cmake/modules/CMakeLists.txt
@@ -6,13 +6,13 @@ include(FindPrefixFromConfig)
# Generate a list of CMake library targets so that other CMake projects can
# link against them. LLVM calls its version of this file LLVMExports.cmake, but
# the usual CMake convention seems to be ${Project}Targets.cmake.
-set(CLANG_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/clang" CACHE STRING
+set(CLANG_INSTALL_PACKAGE_DIR "share/clang" CACHE STRING
"Path for CMake subdirectory for Clang (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/clang')")
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang")
# Keep this in sync with llvm/cmake/CMakeLists.txt!
-set(LLVM_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/llvm" CACHE STRING
+set(LLVM_INSTALL_PACKAGE_DIR "share/llvm" CACHE STRING
"Path for CMake subdirectory for LLVM (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/llvm')")
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
diff --git a/clang/utils/hmaptool/CMakeLists.txt b/clang/utils/hmaptool/CMakeLists.txt
index 511268069bd1..72915ec66504 100644
--- a/clang/utils/hmaptool/CMakeLists.txt
+++ b/clang/utils/hmaptool/CMakeLists.txt
@@ -1,4 +1,4 @@
-install(PROGRAMS hmaptool DESTINATION "${CLANG_TOOLS_INSTALL_DIR}" COMPONENT hmaptool)
+install(PROGRAMS hmaptool DESTINATION "${LLVM_TOOLS_INSTALL_DIR}" COMPONENT hmaptool)
add_custom_target(hmaptool ALL DEPENDS "hmaptool")
set_target_properties(hmaptool PROPERTIES FOLDER "Utils")
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index e322af89a042..0df6a7a775cd 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -377,7 +377,7 @@ macro(load_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_DIR "${LLVM_BINARY_DIR_CMAKE_STYLE}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
+ set(LLVM_CMAKE_DIR "${LLVM_BINARY_DIR_CMAKE_STYLE}/share/llvm")
endif()
set(LLVM_CMAKE_INCLUDE_FILE "${LLVM_CMAKE_DIR}/LLVMConfig.cmake")
diff --git a/flang/cmake/modules/CMakeLists.txt b/flang/cmake/modules/CMakeLists.txt
index 105cc09bf850..460db6c1d9e7 100644
--- a/flang/cmake/modules/CMakeLists.txt
+++ b/flang/cmake/modules/CMakeLists.txt
@@ -5,13 +5,13 @@ include(FindPrefixFromConfig)
# Generate a list of CMake library targets so that other CMake projects can
# link against them. LLVM calls its version of this file LLVMExports.cmake, but
# the usual CMake convention seems to be ${Project}Targets.cmake.
-set(FLANG_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/flang" CACHE STRING
+set(FLANG_INSTALL_PACKAGE_DIR "share/flang" CACHE STRING
"Path for CMake subdirectory for Flang (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/flang')")
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
set(flang_cmake_builddir "${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/flang")
# Keep this in sync with llvm/cmake/CMakeLists.txt!
-set(LLVM_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/llvm" CACHE STRING
+set(LLVM_INSTALL_PACKAGE_DIR "share/llvm" CACHE STRING
"Path for CMake subdirectory for LLVM (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/llvm')")
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
diff --git a/lld/cmake/modules/CMakeLists.txt b/lld/cmake/modules/CMakeLists.txt
index 57195bce45c9..e24c080725d7 100644
--- a/lld/cmake/modules/CMakeLists.txt
+++ b/lld/cmake/modules/CMakeLists.txt
@@ -5,13 +5,13 @@ include(FindPrefixFromConfig)
# Generate a list of CMake library targets so that other CMake projects can
# link against them. LLVM calls its version of this file LLVMExports.cmake, but
# the usual CMake convention seems to be ${Project}Targets.cmake.
-set(LLD_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/lld" CACHE STRING
+set(LLD_INSTALL_PACKAGE_DIR "share/lld" CACHE STRING
"Path for CMake subdirectory for LLD (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/lld')")
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
set(lld_cmake_builddir "${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/lld")
# Keep this in sync with llvm/cmake/CMakeLists.txt!
-set(LLVM_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/llvm" CACHE STRING
+set(LLVM_INSTALL_PACKAGE_DIR "share/llvm" CACHE STRING
"Path for CMake subdirectory for LLVM (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/llvm')")
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 4be91312271d..d6002808a205 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -325,7 +325,7 @@ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name
# LLVM_INSTALL_PACKAGE_DIR needs to be declared prior to adding the tools
# subdirectory in order to have the value available for llvm-config.
include(GNUInstallPackageDir)
-set(LLVM_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/llvm" CACHE STRING
+set(LLVM_INSTALL_PACKAGE_DIR "share/llvm" CACHE STRING
"Path for CMake subdirectory for LLVM (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/llvm')")
set(LLVM_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 057431208322..89cbba8a5676 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -1093,7 +1093,7 @@ function(process_llvm_pass_plugins)
message(FATAL_ERROR "LLVM_INSTALL_PACKAGE_DIR must be defined and writable. GEN_CONFIG should only be passe when building LLVM proper.")
endif()
# LLVM_INSTALL_PACKAGE_DIR might be absolute, so don't reuse below.
- set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
+ set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm")
file(WRITE
"${llvm_cmake_builddir}/LLVMConfigExtensions.cmake"
"set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})")
diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
index 470881516915..36d2e9aa2120 100644
--- a/llvm/cmake/modules/CMakeLists.txt
+++ b/llvm/cmake/modules/CMakeLists.txt
@@ -3,7 +3,7 @@ include(LLVMDistributionSupport)
include(FindPrefixFromConfig)
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
-set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
+set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm")
# First for users who use an installed LLVM, create the LLVMExports.cmake file.
set(LLVM_EXPORTS_FILE ${llvm_cmake_builddir}/LLVMExports.cmake)
diff --git a/mlir/cmake/modules/CMakeLists.txt b/mlir/cmake/modules/CMakeLists.txt
index 5fd9454cad93..af1d73a852c7 100644
--- a/mlir/cmake/modules/CMakeLists.txt
+++ b/mlir/cmake/modules/CMakeLists.txt
@@ -6,16 +6,16 @@ include(FindPrefixFromConfig)
# Generate a list of CMake library targets so that other CMake projects can
# link against them. LLVM calls its version of this file LLVMExports.cmake, but
# the usual CMake convention seems to be ${Project}Targets.cmake.
-set(MLIR_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/mlir" CACHE STRING
+set(MLIR_INSTALL_PACKAGE_DIR "share/mlir" CACHE STRING
"Path for CMake subdirectory for Polly (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/polly')")
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
-set(mlir_cmake_builddir "${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/mlir")
+set(mlir_cmake_builddir "${CMAKE_BINARY_DIR}/share/mlir")
# Keep this in sync with llvm/cmake/CMakeLists.txt!
-set(LLVM_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/llvm" CACHE STRING
+set(LLVM_INSTALL_PACKAGE_DIR "share/llvm" CACHE STRING
"Path for CMake subdirectory for LLVM (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/llvm')")
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
-set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
+set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm")
get_property(MLIR_EXPORTS GLOBAL PROPERTY MLIR_EXPORTS)
export(TARGETS ${MLIR_EXPORTS} FILE ${mlir_cmake_builddir}/MLIRTargets.cmake)
diff --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt
index 74f805865d2d..998ddb3b48e8 100644
--- a/mlir/test/CMakeLists.txt
+++ b/mlir/test/CMakeLists.txt
@@ -8,7 +8,7 @@ endif()
# Passed to lit.site.cfg.py.so that the out of tree Standalone dialect test
# can find MLIR's CMake configuration
set(MLIR_CMAKE_DIR
- "${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/mlir")
+ "${CMAKE_BINARY_DIR}/share/mlir")
# Passed to lit.site.cfg.py.in to set up the path where to find the libraries
# for linalg integration tests.
diff --git a/openmp/tools/Modules/CMakeLists.txt b/openmp/tools/Modules/CMakeLists.txt
index 22d818eea72d..75aacc4468d4 100644
--- a/openmp/tools/Modules/CMakeLists.txt
+++ b/openmp/tools/Modules/CMakeLists.txt
@@ -12,4 +12,4 @@
install(FILES "FindOpenMPTarget.cmake"
- DESTINATION "${OPENMP_INSTALL_LIBDIR}/cmake/openmp")
+ DESTINATION "share/openmp")
diff --git a/polly/cmake/CMakeLists.txt b/polly/cmake/CMakeLists.txt
index 4c528d562e23..800080fb3f79 100644
--- a/polly/cmake/CMakeLists.txt
+++ b/polly/cmake/CMakeLists.txt
@@ -4,15 +4,15 @@ include(GNUInstallPackageDir)
include(ExtendPath)
include(FindPrefixFromConfig)
-set(POLLY_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/polly" CACHE STRING
+set(POLLY_INSTALL_PACKAGE_DIR "share/polly" CACHE STRING
"Path for CMake subdirectory for Polly (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/polly')")
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
-set(polly_cmake_builddir "${POLLY_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/polly")
+set(polly_cmake_builddir "${POLLY_BINARY_DIR}/share/polly")
-set(LLVM_INSTALL_PACKAGE_DIR "${CMAKE_INSTALL_PACKAGEDIR}/llvm" CACHE STRING
+set(LLVM_INSTALL_PACKAGE_DIR "share/llvm" CACHE STRING
"Path for CMake subdirectory for LLVM (defaults to '${CMAKE_INSTALL_PACKAGEDIR}/llvm')")
# CMAKE_INSTALL_PACKAGEDIR might be absolute, so don't reuse below.
-set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
+set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm")
if (CMAKE_CONFIGURATION_TYPES)
set(POLLY_EXPORTS_FILE_NAME "PollyExports-$<LOWER_CASE:$<CONFIG>>.cmake")

View File

@ -1,161 +0,0 @@
clang/cmake/modules/CMakeLists.txt | 4 ++--
compiler-rt/cmake/Modules/CompilerRTUtils.cmake | 2 +-
flang/cmake/modules/CMakeLists.txt | 4 ++--
lld/cmake/modules/CMakeLists.txt | 4 ++--
llvm/cmake/modules/AddLLVM.cmake | 2 +-
llvm/cmake/modules/CMakeLists.txt | 2 +-
mlir/cmake/modules/CMakeLists.txt | 4 ++--
mlir/test/CMakeLists.txt | 2 +-
openmp/tools/Modules/CMakeLists.txt | 2 +-
polly/cmake/CMakeLists.txt | 4 ++--
10 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/clang/cmake/modules/CMakeLists.txt b/clang/cmake/modules/CMakeLists.txt
index c6f6ce9fe5d6..fc886b23a1a8 100644
--- a/clang/cmake/modules/CMakeLists.txt
+++ b/clang/cmake/modules/CMakeLists.txt
@@ -5,11 +5,11 @@ include(FindPrefixFromConfig)
# Generate a list of CMake library targets so that other CMake projects can
# link against them. LLVM calls its version of this file LLVMExports.cmake, but
# the usual CMake convention seems to be ${Project}Targets.cmake.
-set(CLANG_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/clang)
+set(CLANG_INSTALL_PACKAGE_DIR share/clang)
set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}")
# Keep this in sync with llvm/cmake/CMakeLists.txt!
-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
+set(LLVM_INSTALL_PACKAGE_DIR share/llvm)
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS)
diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
index 052095801aae..f3402793b60c 100644
--- a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+++ b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
@@ -376,7 +376,7 @@ macro(load_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_DIR "${LLVM_BINARY_DIR_CMAKE_STYLE}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
+ set(LLVM_CMAKE_DIR "${LLVM_BINARY_DIR_CMAKE_STYLE}/share/llvm")
endif()
set(LLVM_CMAKE_INCLUDE_FILE "${LLVM_CMAKE_DIR}/LLVMConfig.cmake")
diff --git a/flang/cmake/modules/CMakeLists.txt b/flang/cmake/modules/CMakeLists.txt
index 170568c80dde..1bf6d6a829e2 100644
--- a/flang/cmake/modules/CMakeLists.txt
+++ b/flang/cmake/modules/CMakeLists.txt
@@ -4,11 +4,11 @@ include(FindPrefixFromConfig)
# Generate a list of CMake library targets so that other CMake projects can
# link against them. LLVM calls its version of this file LLVMExports.cmake, but
# the usual CMake convention seems to be ${Project}Targets.cmake.
-set(FLANG_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/flang)
+set(FLANG_INSTALL_PACKAGE_DIR share/flang)
set(flang_cmake_builddir "${CMAKE_BINARY_DIR}/${FLANG_INSTALL_PACKAGE_DIR}")
# Keep this in sync with llvm/cmake/CMakeLists.txt!
-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
+set(LLVM_INSTALL_PACKAGE_DIR share/llvm)
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
get_property(FLANG_EXPORTS GLOBAL PROPERTY FLANG_EXPORTS)
diff --git a/lld/cmake/modules/CMakeLists.txt b/lld/cmake/modules/CMakeLists.txt
index 760c9d5f8d87..acd8a65808f5 100644
--- a/lld/cmake/modules/CMakeLists.txt
+++ b/lld/cmake/modules/CMakeLists.txt
@@ -4,11 +4,11 @@ include(FindPrefixFromConfig)
# Generate a list of CMake library targets so that other CMake projects can
# link against them. LLVM calls its version of this file LLVMExports.cmake, but
# the usual CMake convention seems to be ${Project}Targets.cmake.
-set(LLD_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/lld)
+set(LLD_INSTALL_PACKAGE_DIR share/lld)
set(lld_cmake_builddir "${CMAKE_BINARY_DIR}/${LLD_INSTALL_PACKAGE_DIR}")
# Keep this in sync with llvm/cmake/CMakeLists.txt!
-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
+set(LLVM_INSTALL_PACKAGE_DIR share/llvm)
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
get_property(LLD_EXPORTS GLOBAL PROPERTY LLD_EXPORTS)
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 37bc98f9e021..7cbfa2a9a577 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -1049,7 +1049,7 @@ function(process_llvm_pass_plugins)
## Part 1: Extension header to be included whenever we need extension
# processing.
- set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
+ set(LLVM_INSTALL_PACKAGE_DIR share/llvm)
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
file(WRITE
"${llvm_cmake_builddir}/LLVMConfigExtensions.cmake"
diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
index cea0c1df0a14..639c5422b04a 100644
--- a/llvm/cmake/modules/CMakeLists.txt
+++ b/llvm/cmake/modules/CMakeLists.txt
@@ -2,7 +2,7 @@ include(ExtendPath)
include(LLVMDistributionSupport)
include(FindPrefixFromConfig)
-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
+set(LLVM_INSTALL_PACKAGE_DIR share/llvm)
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
# First for users who use an installed LLVM, create the LLVMExports.cmake file.
diff --git a/mlir/cmake/modules/CMakeLists.txt b/mlir/cmake/modules/CMakeLists.txt
index d6703993bd74..e2f6cd3ea8cb 100644
--- a/mlir/cmake/modules/CMakeLists.txt
+++ b/mlir/cmake/modules/CMakeLists.txt
@@ -5,11 +5,11 @@ include(FindPrefixFromConfig)
# Generate a list of CMake library targets so that other CMake projects can
# link against them. LLVM calls its version of this file LLVMExports.cmake, but
# the usual CMake convention seems to be ${Project}Targets.cmake.
-set(MLIR_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/mlir)
+set(MLIR_INSTALL_PACKAGE_DIR share/mlir)
set(mlir_cmake_builddir "${CMAKE_BINARY_DIR}/${MLIR_INSTALL_PACKAGE_DIR}")
# Keep this in sync with llvm/cmake/CMakeLists.txt!
-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
+set(LLVM_INSTALL_PACKAGE_DIR share/llvm)
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
get_property(MLIR_EXPORTS GLOBAL PROPERTY MLIR_EXPORTS)
diff --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt
index 8e44a9c37cf1..f6edc7d77ffd 100644
--- a/mlir/test/CMakeLists.txt
+++ b/mlir/test/CMakeLists.txt
@@ -8,7 +8,7 @@ endif()
# Passed to lit.site.cfg.py.so that the out of tree Standalone dialect test
# can find MLIR's CMake configuration
set(MLIR_CMAKE_DIR
- "${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/mlir")
+ "${CMAKE_BINARY_DIR}/share/mlir")
# Passed to lit.site.cfg.py.in to set up the path where to find the libraries
# for linalg integration tests.
diff --git a/openmp/tools/Modules/CMakeLists.txt b/openmp/tools/Modules/CMakeLists.txt
index 22d818eea72d..75aacc4468d4 100644
--- a/openmp/tools/Modules/CMakeLists.txt
+++ b/openmp/tools/Modules/CMakeLists.txt
@@ -12,4 +12,4 @@
install(FILES "FindOpenMPTarget.cmake"
- DESTINATION "${OPENMP_INSTALL_LIBDIR}/cmake/openmp")
+ DESTINATION "share/openmp")
diff --git a/polly/cmake/CMakeLists.txt b/polly/cmake/CMakeLists.txt
index 7a0190b69df6..cdd3b4f126bb 100644
--- a/polly/cmake/CMakeLists.txt
+++ b/polly/cmake/CMakeLists.txt
@@ -3,8 +3,8 @@
include(ExtendPath)
include(FindPrefixFromConfig)
-set(LLVM_INSTALL_PACKAGE_DIR "lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
-set(POLLY_INSTALL_PACKAGE_DIR "lib${LLVM_LIBDIR_SUFFIX}/cmake/polly")
+set(LLVM_INSTALL_PACKAGE_DIR "share/llvm")
+set(POLLY_INSTALL_PACKAGE_DIR "share/polly")
if (CMAKE_CONFIGURATION_TYPES)
set(POLLY_EXPORTS_FILE_NAME "PollyExports-$<LOWER_CASE:$<CONFIG>>.cmake")
else()

View File

@ -2,10 +2,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp
index 8ed88f33ead4..3f2d1b98adcc 100644
index 2c6c55f89d38..f2b581559991 100644
--- a/llvm/tools/llvm-config/llvm-config.cpp
+++ b/llvm/tools/llvm-config/llvm-config.cpp
@@ -305,7 +305,7 @@ int main(int argc, char **argv) {
@@ -307,7 +307,7 @@ int main(int argc, char **argv) {
// bin dir).
sys::fs::make_absolute(CurrentPath);
CurrentExecPrefix =

View File

@ -4,20 +4,20 @@
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/clang/lib/Headers/CMakeLists.txt b/clang/lib/Headers/CMakeLists.txt
index 078988980c52..795f495b32d6 100644
index 6e2060991b92..94ced7feda9b 100644
--- a/clang/lib/Headers/CMakeLists.txt
+++ b/clang/lib/Headers/CMakeLists.txt
@@ -234,7 +234,7 @@ set_target_properties(clang-resource-headers PROPERTIES
FOLDER "Misc"
RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
@@ -420,7 +420,7 @@ add_header_target("openmp-resource-headers" ${openmp_wrapper_files})
add_header_target("windows-resource-headers" ${windows_only_files})
add_header_target("utility-resource-headers" ${utility_files})
-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+set(header_install_dir tools/llvm/lib/clang/${CLANG_VERSION}/include)
install(
FILES ${files} ${generated_files}
#############################################################
# Install rules for the catch-all clang-resource-headers target
diff --git a/clang/runtime/CMakeLists.txt b/clang/runtime/CMakeLists.txt
index ca7e17927ee1..87d4282b36ad 100644
index 9f4633bc85b1..6d7b70ee0dea 100644
--- a/clang/runtime/CMakeLists.txt
+++ b/clang/runtime/CMakeLists.txt
@@ -84,7 +84,7 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/)
@ -30,10 +30,10 @@ index ca7e17927ee1..87d4282b36ad 100644
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
-DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX}
diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake
index d7b0124f3546..55e515cb1c7a 100644
index 8a6219568b3f..f9c9f6478280 100644
--- a/compiler-rt/cmake/base-config-ix.cmake
+++ b/compiler-rt/cmake/base-config-ix.cmake
@@ -44,7 +44,7 @@ if (LLVM_TREE_AVAILABLE)
@@ -45,7 +45,7 @@ if (LLVM_TREE_AVAILABLE)
# Setup the paths where compiler-rt runtimes and headers should be stored.
set(COMPILER_RT_OUTPUT_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION})
set(COMPILER_RT_EXEC_OUTPUT_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})

View File

@ -8,14 +8,12 @@
clang/tools/scan-build-py/CMakeLists.txt | 4 ++--
clang/tools/scan-build/CMakeLists.txt | 2 +-
clang/tools/scan-view/CMakeLists.txt | 2 +-
clang/utils/hmaptool/CMakeLists.txt | 2 +-
flang/cmake/modules/AddFlang.cmake | 2 +-
flang/tools/f18/CMakeLists.txt | 2 +-
flang/tools/flang-driver/CMakeLists.txt | 2 +-
lld/cmake/modules/AddLLD.cmake | 2 +-
lld/tools/lld/CMakeLists.txt | 2 +-
lldb/cmake/modules/AddLLDB.cmake | 2 +-
17 files changed, 18 insertions(+), 18 deletions(-)
15 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/clang-tools-extra/clang-tidy/tool/CMakeLists.txt b/clang-tools-extra/clang-tidy/tool/CMakeLists.txt
index 3ce552872015..e09b917ae5f8 100644
@ -41,18 +39,18 @@ index fb17e353c39f..4b409e47446a 100644
+ RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}"
COMPONENT clang-extras)
diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake
index 9bbbfc032b7d..bd238ff249cd 100644
index 21ac332e4f5f..1aaf785bdc99 100644
--- a/clang/cmake/modules/AddClang.cmake
+++ b/clang/cmake/modules/AddClang.cmake
@@ -160,7 +160,7 @@ macro(add_clang_tool name)
get_target_export_arg(${name} Clang export_to_clangtargets)
install(TARGETS ${name}
${export_to_clangtargets}
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}"
COMPONENT ${name})
@@ -166,7 +166,7 @@ macro(add_clang_tool name)
get_target_export_arg(${name} Clang export_to_clangtargets)
install(TARGETS ${name}
${export_to_clangtargets}
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}"
COMPONENT ${name})
if(NOT LLVM_ENABLE_IDE)
if(NOT LLVM_ENABLE_IDE)
diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt
index 0ae1b4e55244..e8a34e136194 100644
--- a/clang/tools/c-index-test/CMakeLists.txt
@ -78,14 +76,14 @@ index bbdef93b576b..8744e414da0a 100644
+ DESTINATION "${LLVM_TOOLS_INSTALL_DIR}"
COMPONENT clang-format)
diff --git a/clang/tools/clang-linker-wrapper/CMakeLists.txt b/clang/tools/clang-linker-wrapper/CMakeLists.txt
index 1614f40fb60e..0e78982310c7 100644
index 88c19cad7b53..b50c9ff90586 100644
--- a/clang/tools/clang-linker-wrapper/CMakeLists.txt
+++ b/clang/tools/clang-linker-wrapper/CMakeLists.txt
@@ -37,4 +37,4 @@ target_link_libraries(clang-linker-wrapper
@@ -44,4 +44,4 @@ target_link_libraries(clang-linker-wrapper
${CLANG_LINKER_WRAPPER_LIB_DEPS}
)
-install(TARGETS clang-linker-wrapper RUNTIME DESTINATION bin)
-install(TARGETS clang-linker-wrapper RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+install(TARGETS clang-linker-wrapper RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}")
diff --git a/clang/tools/clang-nvlink-wrapper/CMakeLists.txt b/clang/tools/clang-nvlink-wrapper/CMakeLists.txt
index 2c979e509795..f22b801fe19a 100644
@ -120,7 +118,7 @@ index 061dc7ef4dd9..91499600693b 100644
list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
endif()
diff --git a/clang/tools/scan-build/CMakeLists.txt b/clang/tools/scan-build/CMakeLists.txt
index 4a578b4c6f3e..05574a4919f6 100644
index ef687b0e90a1..a52af70443c3 100644
--- a/clang/tools/scan-build/CMakeLists.txt
+++ b/clang/tools/scan-build/CMakeLists.txt
@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD)
@ -145,24 +143,11 @@ index 07aec76ee66f..ca6a3380ad0c 100644
COMPONENT scan-view)
endforeach()
diff --git a/clang/utils/hmaptool/CMakeLists.txt b/clang/utils/hmaptool/CMakeLists.txt
index f0d9866782b8..5fcdfc04425f 100644
--- a/clang/utils/hmaptool/CMakeLists.txt
+++ b/clang/utils/hmaptool/CMakeLists.txt
@@ -10,7 +10,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM
list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL})
install(PROGRAMS ${CLANG_HMAPTOOL}
- DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ DESTINATION "${LLVM_TOOLS_INSTALL_DIR}"
COMPONENT hmaptool)
add_custom_target(hmaptool ALL DEPENDS ${Depends})
diff --git a/flang/cmake/modules/AddFlang.cmake b/flang/cmake/modules/AddFlang.cmake
index 369e303e148a..3c3697c07406 100644
index d516ca31b51f..4a0d4ce80168 100644
--- a/flang/cmake/modules/AddFlang.cmake
+++ b/flang/cmake/modules/AddFlang.cmake
@@ -109,7 +109,7 @@ macro(add_flang_tool name)
@@ -110,7 +110,7 @@ macro(add_flang_tool name)
get_target_export_arg(${name} Flang export_to_flangtargets)
install(TARGETS ${name}
${export_to_flangtargets}
@ -172,28 +157,30 @@ index 369e303e148a..3c3697c07406 100644
if(NOT LLVM_ENABLE_IDE)
diff --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt
index aa77676c6229..dd15b0b7727b 100644
index dd0898730e2e..d01c2f8076e3 100644
--- a/flang/tools/f18/CMakeLists.txt
+++ b/flang/tools/f18/CMakeLists.txt
@@ -50,5 +50,5 @@ if (NOT WIN32)
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/flang
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/flang ${CMAKE_BINARY_DIR}/bin)
add_custom_target(flang ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang)
- install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang DESTINATION "${LLVM_TOOLS_INSTALL_DIR}")
@@ -56,7 +56,7 @@ if (NOT WIN32)
@ONLY
)
add_custom_target(flang-to-external-fc ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc)
- install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/flang-to-external-fc DESTINATION "${LLVM_TOOLS_INSTALL_DIR}")
endif()
# TODO Move this to a more suitable location
diff --git a/flang/tools/flang-driver/CMakeLists.txt b/flang/tools/flang-driver/CMakeLists.txt
index b3e90746e786..b327e69aaeaa 100644
index 94c8ce6d58f1..466d41c58b1d 100644
--- a/flang/tools/flang-driver/CMakeLists.txt
+++ b/flang/tools/flang-driver/CMakeLists.txt
@@ -34,4 +34,4 @@ if(FLANG_PLUGIN_SUPPORT)
@@ -42,4 +42,4 @@ if(FLANG_PLUGIN_SUPPORT)
export_executable_symbols_for_plugins(flang-new)
endif()
-install(TARGETS flang-new DESTINATION "${CMAKE_INSTALL_BINDIR}")
+install(TARGETS flang-new DESTINATION "${LLVM_TOOLS_INSTALL_DIR}")
diff --git a/lld/cmake/modules/AddLLD.cmake b/lld/cmake/modules/AddLLD.cmake
index dd2898ce6236..86560bddd5e4 100644
index d3924f7243d4..f328b62ad8c8 100644
--- a/lld/cmake/modules/AddLLD.cmake
+++ b/lld/cmake/modules/AddLLD.cmake
@@ -47,7 +47,7 @@ macro(add_lld_tool name)
@ -205,19 +192,6 @@ index dd2898ce6236..86560bddd5e4 100644
COMPONENT ${name})
if(NOT CMAKE_CONFIGURATION_TYPES)
diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt
index df48cc0d6c51..1363144fd8e1 100644
--- a/lld/tools/lld/CMakeLists.txt
+++ b/lld/tools/lld/CMakeLists.txt
@@ -20,7 +20,7 @@ target_link_libraries(lld
)
install(TARGETS lld
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}")
if(NOT LLD_SYMLINKS_TO_CREATE)
set(LLD_SYMLINKS_TO_CREATE
diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake
index 3291a7c808e1..9fe9b9a7940d 100644
--- a/lldb/cmake/modules/AddLLDB.cmake
@ -231,3 +205,16 @@ index 3291a7c808e1..9fe9b9a7940d 100644
if(ARG_INSTALL_PREFIX)
set(install_dest ${ARG_INSTALL_PREFIX})
endif()
diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt
index df48cc0d6..1363144fd 100644
--- a/lld/tools/lld/CMakeLists.txt
+++ b/lld/tools/lld/CMakeLists.txt
@@ -20,7 +20,7 @@ target_link_libraries(lld
)
install(TARGETS lld
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ RUNTIME DESTINATION "${LLVM_TOOLS_INSTALL_DIR}")
if(NOT LLD_SYMLINKS_TO_CREATE)
set(LLD_SYMLINKS_TO_CREATE

View File

@ -1,11 +1,11 @@
bolt/tools/driver/CMakeLists.txt | 8 --------
1 file changed, 8 deletions(-)
bolt/tools/driver/CMakeLists.txt | 7 -------
1 file changed, 7 deletions(-)
diff --git a/bolt/tools/driver/CMakeLists.txt b/bolt/tools/driver/CMakeLists.txt
index d50781615663..df06604c724c 100644
index e56be15dbcff..85b078e2e761 100644
--- a/bolt/tools/driver/CMakeLists.txt
+++ b/bolt/tools/driver/CMakeLists.txt
@@ -33,14 +33,6 @@ set(BOLT_DEPENDS
@@ -35,13 +35,6 @@ set(BOLT_DEPENDS
)
add_custom_target(bolt DEPENDS ${BOLT_DEPENDS})
@ -13,7 +13,6 @@ index d50781615663..df06604c724c 100644
- ${CMAKE_BINARY_DIR}/bin/llvm-bolt
- ${CMAKE_BINARY_DIR}/bin/perf2bolt
- ${CMAKE_BINARY_DIR}/bin/llvm-boltdiff
- ${CMAKE_BINARY_DIR}/bin/llvm-bolt-heatmap
- DESTINATION ${CMAKE_INSTALL_BINDIR}
- COMPONENT bolt
- )

View File

@ -0,0 +1,18 @@
diff --git a/mlir/include/mlir/IR/PatternMatch.h b/mlir/include/mlir/IR/PatternMatch.h
index 12bf196bb58e5..200eae8c3b71c 100644
--- a/mlir/include/mlir/IR/PatternMatch.h
+++ b/mlir/include/mlir/IR/PatternMatch.h
@@ -1102,10 +1097,9 @@ void assertArgs(PatternRewriter &rewriter, ArrayRef<PDLValue> values,
auto errorFn = [&](const Twine &msg) -> LogicalResult {
llvm::report_fatal_error(msg);
};
- (void)std::initializer_list<int>{
- (assert(succeeded(ProcessPDLValue<typename FnTraitsT::template arg_t<
- I + 1>>::verifyAsArg(errorFn, values[I], I))),
- 0)...};
+ assert((succeeded(ProcessPDLValue<typename FnTraitsT::template arg_t<I + 1>>::
+ verifyAsArg(errorFn, values[I], I)) &&
+ ...));
#endif
}

View File

@ -29,7 +29,7 @@ index e795032..5e8cba5 100644
foreach(alias IN LISTS LIBOMP_ALIASES)
@@ -362,6 +366,7 @@ if(WIN32)
install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E copy \"${LIBOMP_IMP_LIB_FILE}\"
\"${alias}${CMAKE_STATIC_LIBRARY_SUFFIX}\" WORKING_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${OPENMP_INSTALL_LIBDIR}\")")
\"${alias}${CMAKE_STATIC_LIBRARY_SUFFIX}\" WORKING_DIRECTORY \"${outdir}\")")
endforeach()
+ endif()
else()

View File

@ -4,17 +4,18 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO llvm/llvm-project
REF llvmorg-${VERSION}
SHA512 d64f97754c24f32deb5f284ebbd486b3a467978b7463d622f50d5237fff91108616137b4394f1d1ce836efa59bf7bec675b6dee257a79b241c15be52d4697460
SHA512 99beff9ee6f8c26f16ea53f03ba6209a119099cbe361701b0d5f4df9d5cc5f2f0da7c994c899a4cec876da8428564dc7a8e798226a9ba8b5c18a3ef8b181d39e
HEAD_REF main
PATCHES
0002-fix-install-paths.patch # This patch fixes paths in ClangConfig.cmake, LLVMConfig.cmake, LLDConfig.cmake etc.
0004-fix-dr-1734.patch
0005-fix-tools-path.patch
0007-fix-compiler-rt-install-path.patch
0009-fix-tools-install-path.patch
0010-fix-libffi.patch
0011-fix-install-bolt.patch
0012-disable-libomp-aliases.patch
0001-Fix-install-paths.patch # This patch fixes paths in ClangConfig.cmake, LLVMConfig.cmake, LLDConfig.cmake etc.
0002-Fix-DR-1734.patch
0003-Fix-tools-path.patch
0004-Fix-compiler-rt-install-path.patch
0005-Fix-tools-install-path.patch
0006-Fix-libffi.patch
0007-Fix-install-bolt.patch
0008-llvm_assert.patch
0009-disable-libomp-aliases.patch
)
vcpkg_check_features(
@ -29,6 +30,7 @@ vcpkg_check_features(
enable-ffi LLVM_ENABLE_FFI
enable-terminfo LLVM_ENABLE_TERMINFO
enable-threads LLVM_ENABLE_THREADS
enable-ios COMPILER_RT_ENABLE_IOS
enable-eh LLVM_ENABLE_EH
enable-bindings LLVM_ENABLE_BINDINGS
)
@ -40,14 +42,17 @@ include("${cmake_vars_file}")
# LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON disables this error.
# See https://developercommunity.visualstudio.com/content/problem/845933/miscompile-boolean-condition-deduced-to-be-always.html
# and thread "[llvm-dev] Longstanding failing tests - clang-tidy, MachO, Polly" on llvm-dev Jan 21-23 2020.
list(APPEND FEATURE_OPTIONS
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON
)
if(VCPKG_DETECTED_MSVC_VERSION LESS "1925" AND VCPKG_DETECTED_CMAKE_C_COMPILER_ID STREQUAL "MSVC")
list(APPEND FEATURE_OPTIONS
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON
)
endif()
# Force enable or disable external libraries
set(llvm_external_libraries
zlib
libxml2
zstd
)
foreach(external_library IN LISTS llvm_external_libraries)
string(TOLOWER "enable-${external_library}" feature_name)
@ -224,12 +229,14 @@ endforeach()
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY)
vcpkg_add_to_path(${PYTHON3_DIR})
vcpkg_add_to_path("${PYTHON3_DIR}")
set(LLVM_LINK_JOBS 1)
file(REMOVE "${SOURCE_PATH}/llvm/cmake/modules/Findzstd.cmake")
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}/llvm
SOURCE_PATH "${SOURCE_PATH}/llvm"
OPTIONS
${FEATURE_OPTIONS}
-DLLVM_INCLUDE_EXAMPLES=OFF
@ -245,10 +252,20 @@ vcpkg_cmake_configure(
"-DLLVM_ENABLE_RUNTIMES=${LLVM_ENABLE_RUNTIMES}"
"-DLLVM_TARGETS_TO_BUILD=${LLVM_TARGETS_TO_BUILD}"
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}"
-DPACKAGE_VERSION=${VERSION}
# Limit the maximum number of concurrent link jobs to 1. This should fix low amount of memory issue for link.
"-DLLVM_PARALLEL_LINK_JOBS=${LLVM_LINK_JOBS}"
-DLLVM_TOOLS_INSTALL_DIR=tools/llvm
-DLLVM_TOOLS_INSTALL_DIR:PATH=tools/llvm
-DCLANG_TOOLS_INSTALL_DIR:PATH=tools/llvm
-DLLD_TOOLS_INSTALL_DIR:PATH=tools/llvm
-DMLIR_TOOLS_INSTALL_DIR:PATH=tools/llvm
-DBOLT_TOOLS_INSTALL_DIR:PATH=tools/llvm # all others are strings
-DOPENMP_TOOLS_INSTALL_DIR:PATH=tools/llvm
MAYBE_UNUSED_VARIABLES
COMPILER_RT_ENABLE_IOS
OPENMP_TOOLS_INSTALL_DIR
MLIR_TOOLS_INSTALL_DIR
)
vcpkg_cmake_install(ADD_BIN_TO_PATH)

View File

@ -1,7 +1,6 @@
{
"name": "llvm",
"version": "14.0.6",
"port-version": 1,
"version": "15.0.7",
"description": "The LLVM Compiler Infrastructure.",
"homepage": "https://llvm.org",
"license": "Apache-2.0",
@ -80,7 +79,8 @@
"enable-bindings",
"enable-terminfo",
"enable-threads",
"enable-zlib"
"enable-zlib",
"enable-zstd"
]
}
]
@ -162,6 +162,18 @@
"libffi"
]
},
"enable-ios": {
"description": "Build compiler-rt for iOS SDK.",
"dependencies": [
{
"name": "llvm",
"default-features": false,
"features": [
"target-arm"
]
}
]
},
"enable-libxml2": {
"description": "Build with LibXml2.",
"dependencies": [
@ -183,6 +195,12 @@
"zlib"
]
},
"enable-zstd": {
"description": "Build with zstd.",
"dependencies": [
"zstd"
]
},
"flang": {
"description": "Include Fortran front end.",
"dependencies": [

View File

@ -4845,8 +4845,8 @@
"port-version": 1
},
"llvm": {
"baseline": "14.0.6",
"port-version": 1
"baseline": "15.0.7",
"port-version": 0
},
"lmdb": {
"baseline": "0.9.29",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "cb3f603740884034c2a28562e35c47f3c8e45ad6",
"version": "15.0.7",
"port-version": 0
},
{
"git-tree": "321559ad78e1741e396fc25d5f51d4f99d1f40fc",
"version": "14.0.6",