Skip to content

Commit

Permalink
llvm: update to v19.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
oltolm committed Oct 4, 2024
1 parent c1d96e2 commit 5f7ff40
Show file tree
Hide file tree
Showing 11 changed files with 135 additions and 39 deletions.
15 changes: 8 additions & 7 deletions mingw-w64-libc++/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ _realname=libc++
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-libunwind")
_version=18.1.8
_version=19.1.0
_rc=""
_tag=llvmorg-${_version}${_rc}
pkgver=${_version}${_rc/-/}
Expand Down Expand Up @@ -38,17 +38,17 @@ source=("${_url}/libcxx-${pkgver}.src.tar.xz"{,.sig}
"${_url}/runtimes-${pkgver}.src.tar.xz"{,.sig}
"${_url}/llvm-${pkgver}.src.tar.xz"{,.sig}
"${_url}/cmake-${pkgver}.src.tar.xz"{,.sig})
sha256sums=('bdecf90be0072bc720fd5c9c8ab061cdb197edd0c8ad3e170dc3e6bfaa49f388'
sha256sums=('99b3020a8b2134a2efc0c26e2ef9b1f07003f65330fa8eb9c2458f14bbf32f39'
'SKIP'
'256c30d724eeb72713bc08ae1692f53aaf4ebe8a1d662c92bf59e69d6c53dce9'
'0108a40b18d586a4706c03d8eeb78714a242e64ed930aeb74a0574e1c6668a6d'
'SKIP'
'c31577d16978b0da0e472ef751f74893a5b459a7ea4a383b75f7ab93cf1e6877'
'c5e9205f785511e8487bb1c5a51dbb57bfdf946d48bbc4ef5cfb413ff8fdc259'
'SKIP'
'9997c2e91e5438e2963306ba5019d85b5384b467535632738d8670ced8f07cb3'
'e5fc29e02198bc1f900c7e42590720cf4b664d4bee75e5d02bc45a4483f2a3b1'
'SKIP'
'f68cf90f369bc7d0158ba70d860b0cb34dbc163d6ff0ebc6cfa5e515b9b2e28d'
'a8b141cbfa13f50d84ce545899bd311aaa60d59dfbf7f3a0cf84f25badc1544d'
'SKIP'
'59badef592dd34893cd319d42b323aaa990b452d05c7180ff20f23ab1b41e837'
'dc78b6a9ac8a097ca6ac0f23c06821d65e6ea3bf666026f529994c1d01056ae7'
'SKIP')
validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google.
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard
Expand Down Expand Up @@ -122,6 +122,7 @@ build() {
-DLIBUNWIND_ENABLE_FRAME_APIS=ON \
-DLIBUNWIND_ENABLE_SHARED=ON \
-DLIBUNWIND_ENABLE_STATIC=ON \
-DLLVM_INCLUDE_TESTS=OFF \
"${_extra_config[@]}" \
-DPython3_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \
-Wno-dev \
Expand Down
6 changes: 3 additions & 3 deletions mingw-w64-lldb/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fi
_realname=lldb
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
_version=18.1.8
_version=19.1.0
_rc=""
_tag=llvmorg-${_version}${_rc}
pkgver=${_version}${_rc/-/}
Expand Down Expand Up @@ -41,9 +41,9 @@ _pkgfn=$_realname-$pkgver.src
source=($_url/$_pkgfn.tar.xz{,.sig}
${_url}/cmake-${pkgver}.src.tar.xz{,.sig}
"104874.patch"::"https://github.com/llvm/llvm-project/pull/104874.patch")
sha256sums=('cac2db253ee3566c01774a888cc0ac3853f1e141c5c9962f04ee562bdb0af426'
sha256sums=('f3269b8261f713542aaba8ada00950ccb24d1fda302c04be962d369190251d6b'
'SKIP'
'59badef592dd34893cd319d42b323aaa990b452d05c7180ff20f23ab1b41e837'
'dc78b6a9ac8a097ca6ac0f23c06821d65e6ea3bf666026f529994c1d01056ae7'
'SKIP'
'87695f7128fe0fb3f0b698a132f6d18cbe513d35ff1e0ebe25afac395ead8e9f')
validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google.
Expand Down
7 changes: 4 additions & 3 deletions mingw-w64-llvm-openmp/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fi
_realname=openmp
pkgbase=mingw-w64-llvm-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-llvm-${_realname}")
_version=18.1.8
_version=19.1.0
_rc=""
_tag=llvmorg-${_version}${_rc}
pkgver=${_version}${_rc/-/}
Expand All @@ -29,6 +29,7 @@ depends=($( (( _clangprefix )) || echo "${MINGW_PACKAGE_PREFIX}-gcc-libs"))
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-ninja"
"${MINGW_PACKAGE_PREFIX}-python"
$( [[ ${MSYSTEM} == CLANG32 ]] || echo "${MINGW_PACKAGE_PREFIX}-fc")
$( [[ $CARCH == aarch64 ]] || echo "${MINGW_PACKAGE_PREFIX}-uasm" ))
_url=https://github.com/llvm/llvm-project/releases/download/${_tag}
Expand All @@ -37,9 +38,9 @@ source=($_url/$_pkgfn.tar.xz{,.sig}
${_url}/cmake-${pkgver}.src.tar.xz{,.sig}
"001-cast-to-make-gcc-happy.patch"
"002-hacks-for-static-linking.patch")
sha256sums=('60ed57245e73894e4a2a89b15889f367bd906abfe6d3f92e1718223d4b496150'
sha256sums=('c036fd95c8eeea8d7bce4196ee20cc5c5a99702d6ec7f0bb19828e315bc3a9ac'
'SKIP'
'59badef592dd34893cd319d42b323aaa990b452d05c7180ff20f23ab1b41e837'
'dc78b6a9ac8a097ca6ac0f23c06821d65e6ea3bf666026f529994c1d01056ae7'
'SKIP'
'11352ffbe7559a7170f2abd52b3552c877fbcf8fc82cff77b421e8b130a4dd66'
'7238f009264bc1b162b73ca3a2a0b224b65ec3ed384304f3e5464032c4c026f4')
Expand Down
17 changes: 9 additions & 8 deletions mingw-w64-llvm/0002-Fix-Findzstd-on-MINGW.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- a/cmake/modules/Findzstd.cmake
+++ b/cmake/modules/Findzstd.cmake
--- llvm/cmake/modules/Findzstd.cmake.orig 2024-09-17 13:26:36.000000000 +0200
+++ llvm/cmake/modules/Findzstd.cmake 2024-09-29 13:19:16.980962300 +0200
@@ -16,6 +16,8 @@
set(zstd_STATIC_LIBRARY_SUFFIX "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$")
endif()
Expand All @@ -9,9 +9,9 @@
find_path(zstd_INCLUDE_DIR NAMES zstd.h)
find_library(zstd_LIBRARY NAMES zstd zstd_static)
find_library(zstd_STATIC_LIBRARY NAMES
@@ -27,16 +29,17 @@
zstd DEFAULT_MSG
zstd_LIBRARY zstd_INCLUDE_DIR
@@ -27,17 +29,18 @@
zstd DEFAULT_MSG
zstd_LIBRARY zstd_INCLUDE_DIR
)
+endif()

Expand All @@ -25,8 +25,9 @@
+ if(WIN32)
# IMPORTED_LOCATION is the path to the DLL and IMPORTED_IMPLIB is the "library".
get_filename_component(zstd_DIRNAME "${zstd_LIBRARY}" DIRECTORY)
- string(REGEX REPLACE "${CMAKE_INSTALL_LIBDIR}$" "${CMAKE_INSTALL_BINDIR}" zstd_DIRNAME "${zstd_DIRNAME}")
+ string(REGEX REPLACE "\\${CMAKE_INSTALL_LIBDIR}$" "${CMAKE_INSTALL_BINDIR}" zstd_DIRNAME "${zstd_DIRNAME}")
if(NOT "${CMAKE_INSTALL_LIBDIR}" STREQUAL "" AND NOT "${CMAKE_INSTALL_BINDIR}" STREQUAL "")
- string(REGEX REPLACE "${CMAKE_INSTALL_LIBDIR}$" "${CMAKE_INSTALL_BINDIR}" zstd_DIRNAME "${zstd_DIRNAME}")
+ string(REGEX REPLACE "\\${CMAKE_INSTALL_LIBDIR}$" "${CMAKE_INSTALL_BINDIR}" zstd_DIRNAME "${zstd_DIRNAME}")
endif()
get_filename_component(zstd_BASENAME "${zstd_LIBRARY}" NAME)
string(REGEX REPLACE "\\${CMAKE_LINK_LIBRARY_SUFFIX}$" "${CMAKE_SHARED_LIBRARY_SUFFIX}" zstd_BASENAME "${zstd_BASENAME}")
set_target_properties(zstd::libzstd_shared PROPERTIES
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ index 0a8e3897cce..de9cda5dda3 100644
@@ -41,6 +41,9 @@ set(system_libs)
# libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc.
# advapi32 required for CryptAcquireContextW in lib/Support/Windows/Path.inc.
set(system_libs ${system_libs} psapi shell32 ole32 uuid advapi32 ws2_32)
# ntdll required for RtlGetLastNtStatus in lib/Support/ErrorHandling.cpp.
set(system_libs ${system_libs} psapi shell32 ole32 uuid advapi32 ws2_32 ntdll)
+ if( MINGW )
+ set(system_libs ${system_libs} pthread)
+ endif()
Expand Down
2 changes: 1 addition & 1 deletion mingw-w64-llvm/0004-enable-emutls-for-mingw.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
+ isOSCygMing() || isOHOSFamily();
}

/// Tests whether the target uses -data-sections as default.
/// True if the target supports both general-dynamic and TLSDESC, and TLSDESC
25 changes: 25 additions & 0 deletions mingw-w64-llvm/0201-compiler-rt-fix-mingw-compile-error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 37b214fdd2029a1fb93c02aa57c249db3dd4b106 Mon Sep 17 00:00:00 2001
From: oltolm <[email protected]>
Date: Fri, 4 Oct 2024 12:23:07 +0200
Subject: [PATCH] compiler-rt: fix mingw compile error

---
lib/fuzzer/FuzzerUtilWindows.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/fuzzer/FuzzerUtilWindows.cpp b/lib/fuzzer/FuzzerUtilWindows.cpp
index db80eb3..edf038a 100644
--- a/lib/fuzzer/FuzzerUtilWindows.cpp
+++ b/lib/fuzzer/FuzzerUtilWindows.cpp
@@ -249,7 +249,7 @@ void SetThreadName(std::thread &thread, const std::string &name) {
if (sz > 0) {
buf.resize(sz);
if (MultiByteToWideChar(CP_UTF8, 0, name.data(), -1, &buf[0], sz) > 0) {
- (void)ThreadNameProc(thread.native_handle(), buf.c_str());
+ (void)ThreadNameProc(reinterpret_cast<HANDLE>(thread.native_handle()), buf.c_str());
}
}
}
--
2.46.0.windows.1

32 changes: 21 additions & 11 deletions mingw-w64-llvm/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-llvm"
"${MINGW_PACKAGE_PREFIX}-compiler-rt"
$( (( _clangprefix )) && echo "${MINGW_PACKAGE_PREFIX}-gcc-compat" )
"${MINGW_PACKAGE_PREFIX}-lld")
_version=18.1.8
_version=19.1.0
_rc=""
_tag=llvmorg-${_version}${_rc}
pkgver=${_version}${_rc/-/}
Expand Down Expand Up @@ -75,30 +75,32 @@ source=("${_url}/llvm-${pkgver}.src.tar.xz"{,.sig}
"0101-link-pthread-with-mingw.patch"
"0102-Rename-flang-new-flang-experimental-exec-to-flang.patch"
# 0201-0299 -> rt
"0201-compiler-rt-fix-mingw-compile-error.patch"
# 0301-0399 -> lld
"0303-ignore-new-bfd-options.patch"
# 0401-0499 -> clang-tools-extra
)
sha256sums=('f68cf90f369bc7d0158ba70d860b0cb34dbc163d6ff0ebc6cfa5e515b9b2e28d'
sha256sums=('a8b141cbfa13f50d84ce545899bd311aaa60d59dfbf7f3a0cf84f25badc1544d'
'SKIP'
'5724fe0a13087d5579104cedd2f8b3bc10a212fb79a0fcdac98f4880e19f4519'
'03c3be44ff8e602213222fb99645c239965623d2bf2a6e4d210249520112377e'
'SKIP'
'e58877fcd95ed106824bd1a31276dd17ed0c53adcd60ca75289eac0654f0a7f1'
'eec4beef68f7135011995684d47ac02e0d3781618abb2a6fe18a8dcef6db586f'
'SKIP'
'e054e99a9c9240720616e927cb52363abbc8b4f1ef0286bad3df79ec8fdf892f'
'808b858e93b0bbae4002e13dcbe8bee850c514a58cbfb63b03d8b465ba95a3de'
'SKIP'
'800e6805fb613eb8428f7a199f6d06c4c19f78f2db69157a129bb04fc1c99769'
'8d125e7513735c57adbdd1bbce59ff2d5844c2bf64a00ff94fe1c04b941ca2b2'
'SKIP'
'59badef592dd34893cd319d42b323aaa990b452d05c7180ff20f23ab1b41e837'
'dc78b6a9ac8a097ca6ac0f23c06821d65e6ea3bf666026f529994c1d01056ae7'
'SKIP'
'b76b810f3d3dc5d08e83c4236cb6e395aa9bd5e3ea861e8c319b216d093db074'
'f521e6cdb6598d777c6120d086aee3993f182ab38bc59ce4a59c48fae4839b8c'
'SKIP'
'eb03df53671df6627768141b3aaa76abe176a14e5e47911c97bec544387c4aff'
'0aff3a85d70ae437dfc634fe40db506bf5701403049284ffbdb931135ae8a483'
'016fbf6f742c062cc59360070264546c10385b1e8c37605758f62dcbea8f9bcc'
'5f86e542dd1ec92b2fe06ee59061c3e23512df7bafabe82206f2b7d80b81836b'
'ff8bf96fae9531cf6231b502e8c2f38843f826a9dc7e0d98a37cb80fddd36cf4'
'790eb0fccb4ef29c3795bceb8a62c8f4ecd0bdd6c49b2812352b04cfbc552342'
'76d2a88733cebb1f01b766ff2ab91a9e095bae1d2e4cc18c1ffcf21fd095efc4'
'715cb8862753854b2d9256e0b70003e2d1f57083d83eaeaf5a095fc72b8a4e26'
'2770cadf8ccf6b31aece6aee8f76dceb71e6e9d01fdf3be74c3743480ce34899'
'b6b56d031bba8ae87bb1ac607025c0dcbf2b88aec9bfeaf1c9786ca5093b7b71'
'fd0253879cc5e31857f57307e6105e56493358e35d7c4540e0b476be607ab94e')
validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google.
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard
Expand Down Expand Up @@ -154,6 +156,14 @@ prepare() {
apply_patch_with_msg \
"0102-Rename-flang-new-flang-experimental-exec-to-flang.patch"

# Patch compiler-rt
cd "${srcdir}"/compiler-rt

if (( ! _clangprefix )); then
apply_patch_with_msg \
"0201-compiler-rt-fix-mingw-compile-error.patch"
fi

# Patch lld
cd "${srcdir}"/lld

Expand Down
25 changes: 25 additions & 0 deletions mingw-w64-mlir/0001-ArmSMEStubs-fix-compilation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From de55e8d992e98a2ffb96db4e61eb5ad28c0c97cc Mon Sep 17 00:00:00 2001
From: oltolm <[email protected]>
Date: Sun, 29 Sep 2024 23:43:50 +0200
Subject: [PATCH 1/2] ArmSMEStubs: fix compilation

---
lib/ExecutionEngine/ArmSMEStubs.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ExecutionEngine/ArmSMEStubs.cpp b/lib/ExecutionEngine/ArmSMEStubs.cpp
index e01384b..66cfe23 100644
--- a/lib/ExecutionEngine/ArmSMEStubs.cpp
+++ b/lib/ExecutionEngine/ArmSMEStubs.cpp
@@ -17,7 +17,7 @@
#define MLIR_ARMSMEABISTUBS_EXPORTED __declspec(dllexport)
#else
// We are using this library
-#define MLIR_ARMSMEABISTUBS_EXPORTED __declspec(dllimport)
+#define MLIR_ARMSMEABISTUBS_EXPORTED
#endif // mlir_arm_sme_abi_stubs_EXPORTS
#endif // MLIR_ARMSMEABISTUBS_EXPORTED
#else
--
2.46.0.windows.1

26 changes: 26 additions & 0 deletions mingw-w64-mlir/0002-ExecutionEngine-fix-CMakeLists.txt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 635028b776f18d2bf922f11b2503c69179396ce3 Mon Sep 17 00:00:00 2001
From: oltolm <[email protected]>
Date: Sun, 29 Sep 2024 23:44:15 +0200
Subject: [PATCH 2/2] ExecutionEngine: fix CMakeLists.txt

---
lib/ExecutionEngine/CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)

diff --git a/lib/ExecutionEngine/CMakeLists.txt b/lib/ExecutionEngine/CMakeLists.txt
index a091944..ced2942 100644
--- a/lib/ExecutionEngine/CMakeLists.txt
+++ b/lib/ExecutionEngine/CMakeLists.txt
@@ -117,6 +117,9 @@ if(LLVM_BUILD_LLVM_DYLIB)
LINK_LIBS PUBLIC
LLVM
MLIR
+ MLIRSupport
+ MLIRIR
+ MLIRTargetLLVMIRExport
)
endif()

--
2.46.0.windows.1

16 changes: 11 additions & 5 deletions mingw-w64-mlir/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _compiler=clang
_realname=mlir
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
_version=18.1.8
_version=19.1.0
_rc=""
_tag=llvmorg-${_version}${_rc}
pkgver=${_version}${_rc/-/}
Expand All @@ -32,12 +32,16 @@ _pkgfn=${_realname}-${pkgver}.src
_url=https://github.com/llvm/llvm-project/releases/download/${_tag}
source=("${_url}/${_pkgfn}.tar.xz"{,.sig}
"${_url}/cmake-${pkgver}.src.tar.xz"{,.sig}
0001-tablegen.patch)
sha256sums=('dd0c48618d1663b58ebce78213d592a90db11550199fa4fd0181cc2601316bf9'
0001-tablegen.patch
0001-ArmSMEStubs-fix-compilation.patch
0002-ExecutionEngine-fix-CMakeLists.txt.patch)
sha256sums=('ad4e7687548ad92d7e384133d46d35970e13514af01e118f9a480e134effcf74'
'SKIP'
'59badef592dd34893cd319d42b323aaa990b452d05c7180ff20f23ab1b41e837'
'dc78b6a9ac8a097ca6ac0f23c06821d65e6ea3bf666026f529994c1d01056ae7'
'SKIP'
'3f61c66d5615e387ac1c00dbeb1b5840305ff578de81d60eb65553ff17ced8c6')
'3f61c66d5615e387ac1c00dbeb1b5840305ff578de81d60eb65553ff17ced8c6'
'c00c41e34cce8f121dfe3d69715e72459dc4bf6b3396f2b5788762b40d71b007'
'734e444c16d01919e1a5253dc0f76a98d49ecaeee12d07a6f3fbb9f5a97f2632')
validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google.
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard
'D574BD5D1D0E98895E3BF90044F2485E45D59042') # Tobias Hieta
Expand All @@ -49,6 +53,8 @@ prepare() {

cd "${srcdir}"/${_pkgfn}
patch -p1 -i "${srcdir}"/0001-tablegen.patch
patch -p1 -i "${srcdir}"/0001-ArmSMEStubs-fix-compilation.patch
patch -p1 -i "${srcdir}"/0002-ExecutionEngine-fix-CMakeLists.txt.patch
}

build() {
Expand Down

0 comments on commit 5f7ff40

Please sign in to comment.