python-llvmlite: update, fix build with llvm 11, cleanup
This commit is contained in:
@@ -6,37 +6,43 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
||||
provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
|
||||
pkgver=0.34.0
|
||||
pkgrel=4
|
||||
pkgver=0.36.0
|
||||
pkgrel=1
|
||||
pkgdesc='Lightweight LLVM python binding for writing JIT compilers (mingw-w64)'
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64')
|
||||
url="https://github.com/numba/llvmlite"
|
||||
license=('BSD')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-polly>=10.0.1")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools" "${MINGW_PACKAGE_PREFIX}-cython" "${MINGW_PACKAGE_PREFIX}-cmake")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
||||
"${MINGW_PACKAGE_PREFIX}-cython"
|
||||
"${MINGW_PACKAGE_PREFIX}-cmake")
|
||||
options=('!emptydirs' 'staticlibs' 'strip')
|
||||
source=(llvmlite-$pkgver.tar.gz::"https://github.com/numba/llvmlite/archive/v$pkgver.tar.gz"
|
||||
"multi-defs.patch"
|
||||
"path_fix.patch")
|
||||
sha256sums=('aea5c33d59145b96251d11971bad26d81810962ab683d107b6ef4a18472d3d9a'
|
||||
"path_fix.patch"
|
||||
"llvm-11.0.patch")
|
||||
sha256sums=('084dcde3831def454b938e4c28eaaa65162e9f7b28110bdcb1727010f6b8f532'
|
||||
'b4610934ac8fd7e614d9ea920856ff6da2fbeb146028a664ada8543b8b33ec56'
|
||||
'813ecc48f18543f0d36b03c7596a1a6a26be31b9cfa44f1111ac232821844a79')
|
||||
'813ecc48f18543f0d36b03c7596a1a6a26be31b9cfa44f1111ac232821844a79'
|
||||
'5313db3353a18b08fdaa2032c244a8848a1945e4c88f26fcc37ce1f30b96f173')
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir"
|
||||
rm -rf python-build-${CARCH} | true
|
||||
pushd "${_realname}-${pkgver}"
|
||||
patch -p1 -i "${srcdir}/multi-defs.patch"
|
||||
patch -p1 -i "${srcdir}/path_fix.patch"
|
||||
sed -i "s,_MSC_VER,_WIN32," ffi/core.h
|
||||
popd
|
||||
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
|
||||
cd "$srcdir/${_realname}-${pkgver}"
|
||||
|
||||
patch -p1 -i "${srcdir}/multi-defs.patch"
|
||||
patch -p1 -i "${srcdir}/path_fix.patch"
|
||||
# https://github.com/msys2/MINGW-packages/discussions/8386
|
||||
patch -p1 -i "${srcdir}/llvm-11.0.patch"
|
||||
sed -i "s,_MSC_VER,_WIN32," ffi/core.h
|
||||
}
|
||||
|
||||
build() {
|
||||
msg "Python build for ${CARCH}"
|
||||
cd "$srcdir"
|
||||
cp -r "${_realname}-${pkgver}" "python-build-${CARCH}"
|
||||
cd "${srcdir}/python-build-${CARCH}"
|
||||
|
||||
msg "Python build for ${CARCH}"
|
||||
export CMAKE_GENERATOR="MSYS Makefiles"
|
||||
${MINGW_PREFIX}/bin/python setup.py build
|
||||
}
|
||||
|
||||
33
mingw-w64-python-llvmlite/llvm-11.0.patch
Normal file
33
mingw-w64-python-llvmlite/llvm-11.0.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
diff -Naur llvmlite-0.36.0.a/ffi/custom_passes.cpp llvmlite-0.36.0.b/ffi/custom_passes.cpp
|
||||
--- llvmlite-0.36.0.a/ffi/custom_passes.cpp 2021-03-11 17:54:55.000000000 +0100
|
||||
+++ llvmlite-0.36.0.b/ffi/custom_passes.cpp 2021-03-30 12:25:43.415085100 +0200
|
||||
@@ -400,7 +400,7 @@
|
||||
// LLVM 9 postdomtree.dominates takes basic blocks
|
||||
if ( domtree.dominates(incref, decref)
|
||||
&& postdomtree.dominates(decref->getParent(), incref->getParent()) ){
|
||||
-#elif LLVM_VERSION_MAJOR == 10
|
||||
+#elif LLVM_VERSION_MAJOR == 11
|
||||
// LLVM 10 postdomtree.dominates can handle instructions
|
||||
if ( domtree.dominates(incref, decref)
|
||||
&& postdomtree.dominates(decref, incref) ){
|
||||
diff -Naur llvmlite-0.36.0.a/ffi/transforms.cpp llvmlite-0.36.0.b/ffi/transforms.cpp
|
||||
--- llvmlite-0.36.0.a/ffi/transforms.cpp 2021-03-11 17:54:55.000000000 +0100
|
||||
+++ llvmlite-0.36.0.b/ffi/transforms.cpp 2021-03-30 12:26:12.121988800 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
extern "C" {
|
||||
-
|
||||
+/*
|
||||
namespace llvm {
|
||||
inline PassManagerBuilder *unwrap(LLVMPassManagerBuilderRef P) {
|
||||
return reinterpret_cast<PassManagerBuilder*>(P);
|
||||
@@ -15,7 +15,7 @@
|
||||
return reinterpret_cast<LLVMPassManagerBuilderRef>(P);
|
||||
}
|
||||
}
|
||||
-
|
||||
+*/
|
||||
|
||||
API_EXPORT(LLVMPassManagerBuilderRef)
|
||||
LLVMPY_PassManagerBuilderCreate()
|
||||
Reference in New Issue
Block a user