Skip to content

Commit

Permalink
llvm: update to 20.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiChinoune committed Feb 27, 2025
1 parent 5d4ae91 commit 026f1b3
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 104 deletions.
48 changes: 13 additions & 35 deletions mingw-w64-libc++/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ _realname=libc++
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-libunwind")
_version=19.1.7
_rc=""
_tag=llvmorg-${_version}${_rc}
pkgver=${_version}${_rc/-/}
_pkgver=20.1.0-rc3
pkgver=${_pkgver/-/}
pkgrel=1
arch=(any)
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
Expand All @@ -31,38 +29,18 @@ if [[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]]; then
# GNU's strip breaks the library #11553
options=('!strip')
fi
_url=https://github.com/llvm/llvm-project/releases/download/${_tag}
source=("${_url}/libcxx-${pkgver}.src.tar.xz"{,.sig}
"${_url}/libcxxabi-${pkgver}.src.tar.xz"{,.sig}
"${_url}/libunwind-${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=('b736109650ffc750dbdc506483347b3713ded9d0300f48432b820ad66b6a9052'
'SKIP'
'4d25125109e3febe1393e9e30f93153333d82b48ce7bed637bd2daf52bf40172'
'SKIP'
'10e650f436bc416674f01b5e01177405886f4d0f0b2568c6808044eacad52ea0'
'SKIP'
'404c54c2df45a307331eba1372917ec480addf3b77ca9943ed4d7ea445efb08f'
'SKIP'
'96f833c6ad99a3e8e1d9aca5f439b8fd2c7efdcf83b664e0af1c0712c5315910'
'SKIP'
'11c5a28f90053b0c43d0dec3d0ad579347fc277199c005206b963c19aae514e3'
_url=https://github.com/llvm/llvm-project/releases/download/llvmorg-${_pkgver}
source=("${_url}/llvm-project-${_pkgver}.src.tar.xz"{,.sig})
sha256sums=('SKIP'
'SKIP')
validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google.
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard
'D574BD5D1D0E98895E3BF90044F2485E45D59042') # Tobias Hieta
noextract=(libcxx-${pkgver}.src.tar.xz)
noextract=(llvm-project-${_pkgver}.src.tar.xz)

prepare() {
plain "Extracting libcxx-${pkgver}.src.tar.xz due to symlink(s) without pre-existing target(s)"
cd "${srcdir}"
tar -xJf "${srcdir}"/libcxx-${pkgver}.src.tar.xz -C "${srcdir}" || true
# Rename Directories
for pkg in cmake libcxx libcxxabi libunwind llvm runtimes; do
mv ${pkg}-$pkgver.src ${pkg}
done
plain "Extracting llvm-project-${_pkgver}.src.tar.xz due to symlink(s) without pre-existing target(s)"
tar -xJf "${srcdir}"/llvm-project-${_pkgver}.src.tar.xz -C "${srcdir}" || true
}

build() {
Expand Down Expand Up @@ -126,7 +104,7 @@ build() {
"${_extra_config[@]}" \
-DPython3_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \
-Wno-dev \
../runtimes
../llvm-project-${_pkgver}.src/runtimes

${MINGW_PREFIX}/bin/cmake --build . -- unwind cxxabi cxx cxx_experimental
}
Expand All @@ -138,15 +116,14 @@ package_libc++() {
$( (( _clangprefix )) && echo \
"${MINGW_PACKAGE_PREFIX}-gcc-libs" \
|| true))
conflicts=("${MINGW_PACKAGE_PREFIX}-libc++abi")
replaces=("${MINGW_PACKAGE_PREFIX}-libc++abi")
depends=($( (( _clangprefix )) && echo \
"${MINGW_PACKAGE_PREFIX}-libunwind" \
|| echo "${MINGW_PACKAGE_PREFIX}-gcc-libs"))

DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --build "${srcdir}/build-${MSYSTEM}" --target install-cxx install-cxxabi

install -Dm644 "${srcdir}"/libcxx/LICENSE.TXT "${pkgdir}"${MINGW_PREFIX}/share/licenses/libc++/LICENSE
install -Dm644 "${srcdir}"/llvm-project-${_pkgver}.src/libcxx/LICENSE.TXT \
"${pkgdir}"${MINGW_PREFIX}/share/licenses/libc++/LICENSE
}

package_libunwind() {
Expand All @@ -156,7 +133,8 @@ package_libunwind() {

DESTDIR="${pkgdir}" cmake --build "${srcdir}/build-${MSYSTEM}" --target install-unwind

install -Dm644 "${srcdir}"/libunwind/LICENSE.TXT "${pkgdir}"${MINGW_PREFIX}/share/licenses/libunwind/LICENSE
install -Dm644 "${srcdir}"/llvm-project-${_pkgver}.src/libunwind/LICENSE.TXT \
"${pkgdir}"${MINGW_PREFIX}/share/licenses/libunwind/LICENSE
}

# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
Expand Down

This file was deleted.

58 changes: 23 additions & 35 deletions mingw-w64-llvm/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-llvm"
"${MINGW_PACKAGE_PREFIX}-compiler-rt"
$( (( _clangprefix )) && echo "${MINGW_PACKAGE_PREFIX}-gcc-compat" )
"${MINGW_PACKAGE_PREFIX}-lld")
_version=19.1.7
_rc=""
_tag=llvmorg-${_version}${_rc}
pkgver=${_version}${_rc/-/}
_pkgver=20.1.0-rc3
pkgver=${_pkgver/-/}
pkgrel=1
pkgdesc="C language family frontend for LLVM (mingw-w64)"
arch=('any')
Expand All @@ -57,55 +55,51 @@ makedepends=($([[ "$_compiler" == "clang" ]] && echo \
"${MINGW_PACKAGE_PREFIX}-libc++")
"git"
)
_url=https://github.com/llvm/llvm-project/releases/download/${_tag}
source=("${_url}/llvm-${pkgver}.src.tar.xz"{,.sig}
"${_url}/clang-${pkgver}.src.tar.xz"{,.sig}
"${_url}/clang-tools-extra-${pkgver}.src.tar.xz"{,.sig}
"${_url}/compiler-rt-${pkgver}.src.tar.xz"{,.sig}
"${_url}/lld-${pkgver}.src.tar.xz"{,.sig}
"${_url}/cmake-${pkgver}.src.tar.xz"{,.sig}
"${_url}/third-party-${pkgver}.src.tar.xz"{,.sig}
_url=https://github.com/llvm/llvm-project/releases/download/llvmorg-${_pkgver}
source=("${_url}/llvm-${_pkgver}.src.tar.xz"{,.sig}
"${_url}/clang-${_pkgver}.src.tar.xz"{,.sig}
"${_url}/clang-tools-extra-${_pkgver}.src.tar.xz"{,.sig}
"${_url}/compiler-rt-${_pkgver}.src.tar.xz"{,.sig}
"${_url}/lld-${_pkgver}.src.tar.xz"{,.sig}
"${_url}/cmake-${_pkgver}.src.tar.xz"{,.sig}
"${_url}/third-party-${_pkgver}.src.tar.xz"{,.sig}
# 0001-0099 -> llvm
"0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch"
"0002-Fix-Findzstd-on-MINGW.patch"
"0003-add-pthread-as-system-lib-for-mingw.patch"
"0004-enable-emutls-for-mingw.patch"
# 0101-0199 -> clang
"0101-link-pthread-with-mingw.patch"
"0102-Rename-flang-new-flang-experimental-exec-to-flang.patch"
# 0201-0299 -> rt
# 0301-0399 -> lld
"0303-ignore-new-bfd-options.patch"
# 0401-0499 -> clang-tools-extra
# 0901-0999 -> whole tree
"0901-wholearchive-import-libs.patch::https://github.com/llvm/llvm-project/commit/4a4a8a1476b1386b523dc5b292ba9a5a6748a9cf.patch"
)
sha256sums=('96f833c6ad99a3e8e1d9aca5f439b8fd2c7efdcf83b664e0af1c0712c5315910'
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'11e5e4ecab5338b9914de3b83a4622cb200de466b7c56ba675afb72fa7d64675'
'SKIP'
'430b088bf820550090a6cf0eec67183d045273c18b3f1d6c5207e46d93391be7'
'SKIP'
'c12b6e764202c615c1a3af9a13d477846878757ae0e29e5f8979215a6958fffc'
'SKIP'
'630bf0f31b210e89fd7869bdfd6c376d010fc3b72ee42f08058435035c432e42'
'SKIP'
'11c5a28f90053b0c43d0dec3d0ad579347fc277199c005206b963c19aae514e3'
'SKIP'
'b96deca1d3097c7ffd4ff2bb904a50bdd56bec7ed1413ffb0d1d01af87b72c12'
'SKIP'
'eb03df53671df6627768141b3aaa76abe176a14e5e47911c97bec544387c4aff'
'7cdf15c7e9c13ab99c42b4fafb15d871b22558f751729bb7173ce3edeffc8db8'
'790eb0fccb4ef29c3795bceb8a62c8f4ecd0bdd6c49b2812352b04cfbc552342'
'76d2a88733cebb1f01b766ff2ab91a9e095bae1d2e4cc18c1ffcf21fd095efc4'
'715cb8862753854b2d9256e0b70003e2d1f57083d83eaeaf5a095fc72b8a4e26'
'2770cadf8ccf6b31aece6aee8f76dceb71e6e9d01fdf3be74c3743480ce34899'
'fd0253879cc5e31857f57307e6105e56493358e35d7c4540e0b476be607ab94e'
'630806c9f232d7755ea8fb2c9e2110a511676d728a4f39e91e4867d1e460c1da')
'fd0253879cc5e31857f57307e6105e56493358e35d7c4540e0b476be607ab94e')
validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google.
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard
'D574BD5D1D0E98895E3BF90044F2485E45D59042') # Tobias Hieta
noextract=(clang-${pkgver}.src.tar.xz)
noextract=(clang-${_pkgver}.src.tar.xz)

apply_patch_with_msg() {
for _patch in "$@"
Expand All @@ -125,12 +119,12 @@ revert_patch_with_msg() {

prepare() {
cd "${srcdir}"
plain "Extracting clang-${pkgver}.src.tar.xz due to symlink(s) without pre-existing target(s)"
tar -xJf "${srcdir}"/clang-${pkgver}.src.tar.xz -C "${srcdir}" || true
plain "Extracting clang-${_pkgver}.src.tar.xz due to symlink(s) without pre-existing target(s)"
tar -xJf "${srcdir}"/clang-${_pkgver}.src.tar.xz -C "${srcdir}" || true

# Rename Directories
for pkg in llvm clang clang-tools-extra compiler-rt lld cmake third-party; do
mv ${pkg}-$pkgver.src ${pkg}
mv ${pkg}-${_pkgver}.src ${pkg}
done

# Patch llvm
Expand All @@ -152,9 +146,6 @@ prepare() {
apply_patch_with_msg \
"0101-link-pthread-with-mingw.patch"
fi
# https://reviews.llvm.org/D143592
apply_patch_with_msg \
"0102-Rename-flang-new-flang-experimental-exec-to-flang.patch"

# Patch lld
cd "${srcdir}"/lld
Expand All @@ -167,9 +158,6 @@ prepare() {

# Patch whole tree
cd "${srcdir}"

apply_patch_with_msg \
"0901-wholearchive-import-libs.patch"
}

build() {
Expand Down Expand Up @@ -400,7 +388,7 @@ package_compiler-rt() {

DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install "${srcdir}"/build-${MSYSTEM}/projects/compiler-rt
mkdir -p "${pkgdir}"${MINGW_PREFIX}/bin/
find "${pkgdir}"${MINGW_PREFIX}/lib/clang/${_version%.[0-9].*}/lib/windows/ \
find "${pkgdir}"${MINGW_PREFIX}/lib/clang/${pkgver%.[0-9].*}/lib/windows/ \
-name '*.dll' -exec mv '{}' "${pkgdir}"${MINGW_PREFIX}/bin/ \;
# remove bin dir we created if it is still empty
rmdir "${pkgdir}"${MINGW_PREFIX}/bin/ 2>/dev/null || true
Expand Down

0 comments on commit 026f1b3

Please sign in to comment.