Skip to content

Commit

Permalink
clang: update to curent Msys2 pkgrel 4
Browse files Browse the repository at this point in the history
This fixes git-for-windows/git#4736

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
  • Loading branch information
rimrul committed Dec 18, 2023
1 parent 1efd2fb commit d8279cf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 83 deletions.
8 changes: 6 additions & 2 deletions mingw-w64-clang/0002-Fix-Findzstd-on-MINGW.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/cmake/modules/Findzstd.cmake
+++ b/cmake/modules/Findzstd.cmake
@@ -29,11 +29,11 @@
@@ -29,14 +29,14 @@
)

if(zstd_FOUND)
Expand All @@ -13,4 +13,8 @@
+ 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}")
+ string(REGEX REPLACE "\\${CMAKE_INSTALL_LIBDIR}$" "${CMAKE_INSTALL_BINDIR}" zstd_DIRNAME "${zstd_DIRNAME}")
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
75 changes: 0 additions & 75 deletions mingw-w64-clang/0005-aarch64-unwind-seh.patch

This file was deleted.

12 changes: 7 additions & 5 deletions mingw-w64-clang/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ _version=17.0.6
_rc=
_tag=llvmorg-${_version}${_rc}
pkgver=${_version}${_rc/-/}
pkgrel=3
pkgrel=5
pkgdesc="C language family frontend for LLVM (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
Expand Down Expand Up @@ -91,7 +91,7 @@ sha256sums=('b638167da139126ca11917b6880207cc6e8f9d1cbb1a48d87d017f697ef78188'
'3054d0a9c9375dab1a4539cc2cc45ab340341c5d71475f9599ba7752e222947b'
'SKIP'
'eb03df53671df6627768141b3aaa76abe176a14e5e47911c97bec544387c4aff'
'd7d58ad5d0e77f2803070a8fb7f4138a6f49a2cbf30c55ff059c31f40ca6b65c'
'70930739511f0934bafad518cd02acbccd03915ca4c6bec4b272eb5bcec33e1e'
'7f0c64cd87b61e894be632f180ae5291e1aa9f1d9d382608f659067eeeda7146'
'5f86e542dd1ec92b2fe06ee59061c3e23512df7bafabe82206f2b7d80b81836b'
'715cb8862753854b2d9256e0b70003e2d1f57083d83eaeaf5a095fc72b8a4e26'
Expand Down Expand Up @@ -179,10 +179,13 @@ build() {
FFI_INCLUDE_DIR=$(echo $FFI_INCLUDE_DIR | sed 's|-I||g')

if check_option "debug" "y"; then
common_cmake_args+=(-DCMAKE_BUILD_TYPE=Debug)
common_cmake_args+=(-DCMAKE_BUILD_TYPE=Debug
-DLLVM_ENABLE_ASSERTIONS=ON)
VERBOSE="VERBOSE=1"
else
common_cmake_args+=(-DCMAKE_BUILD_TYPE=MinSizeRel)
common_cmake_args+=(-DCMAKE_BUILD_TYPE=MinSizeRel
-DLLVM_ENABLE_ASSERTIONS=OFF
-DLLVM_ENABLE_DUMP=ON)
fi
common_cmake_args+=(-Wno-dev
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX}
Expand All @@ -192,7 +195,6 @@ build() {
-DPython3_FIND_REGISTRY=NEVER
-DPython3_ROOT_DIR=${MINGW_PREFIX}
-DFFI_INCLUDE_DIR="${FFI_INCLUDE_DIR}"
-DLLVM_ENABLE_ASSERTIONS=OFF
-DLLVM_ENABLE_FFI=ON
-DLLVM_INCLUDE_EXAMPLES=OFF
-DLLVM_INCLUDE_BENCHMARKS=OFF
Expand Down
3 changes: 2 additions & 1 deletion mingw-w64-clang/update-clang-from-msys2.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ mv upstream/$pkgname/README-patches.md ./ || die "$0: failed to replace existing

sed -e "s/pkgrel=[.0-9]\+\(.*\)/pkgrel=$new_pkgrel\1/" \
-e 's/-DCMAKE_BUILD_TYPE=Release/-DCMAKE_BUILD_TYPE=MinSizeRel/' \
-e 's/-DLLVM_TARGETS_TO_BUILD=.*/-DLLVM_TARGETS_TO_BUILD=Native/' \
-e 's/-DLLVM_TARGETS_TO_BUILD=".*"/-DLLVM_TARGETS_TO_BUILD=Native/' \
-e 's/-DLLVM_TARGETS_TO_BUILD=[A-Za-z0-9;]*/-DLLVM_TARGETS_TO_BUILD=Native/' \
-e 's/-DLLVM_ENABLE_SPHINX=ON/-DLLVM_ENABLE_SPHINX=OFF/'\
-e '/^check()/,/^}/d' \
-i PKGBUILD
Expand Down

0 comments on commit d8279cf

Please sign in to comment.