blob: a51195d81e63c33c0e76c5fdebfcc34269fc398c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
pkgname=('mingw-w64-llvm')
pkgver=19.1.7
pkgrel=1
pkgdesc="Collection of modular and reusable compiler and toolchain technologies (mingw-w64)"
arch=('any')
url="http://llvm.org/"
license=('custom:Apache 2.0 with LLVM Exception')
depends=('mingw-w64-zlib' 'mingw-w64-libxml2' 'mingw-w64-libffi' 'mingw-w64-zstd')
makedepends=('mingw-w64-cmake' "llvm>=${pkgver%%.*}" 'python')
options=('!strip' '!buildflags' 'staticlibs')
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/llvm-$pkgver.src.tar.xz{,.sig}
$_source_base/cmake-$pkgver.src.tar.xz{,.sig})
sha256sums=('96f833c6ad99a3e8e1d9aca5f439b8fd2c7efdcf83b664e0af1c0712c5315910'
'SKIP'
'11c5a28f90053b0c43d0dec3d0ad579347fc277199c005206b963c19aae514e3'
'SKIP')
validpgpkeys=('474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard <tstellar@redhat.com>
'D574BD5D1D0E98895E3BF90044F2485E45D59042') # Tobias Hieta <tobias@hieta.se>
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare () {
cd "$srcdir/llvm-$pkgver.src/"
}
build() {
cp -r cmake{-$pkgver.src,}
cd "$srcdir/llvm-$pkgver.src/"
for _arch in ${_architectures}; do
${_arch}-cmake \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_INCLUDE_DOCS=OFF \
-DLLVM_INCLUDE_UTILS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_BUILD_TOOLS=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DLLVM_ENABLE_BINDINGS=OFF \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_Z3_SOLVER=OFF \
-DLLVM_INCLUDE_BENCHMARKS=OFF \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_TARGETS_TO_BUILD="X86" \
-DLLVM_DEFAULT_TARGET_TRIPLE="${_arch}" \
-DLLVM_TARGET_ARCH="X86" \
-DLLVM_TABLEGEN=/usr/bin/llvm-tblgen \
-DLLVM_INFERRED_HOST_TRIPLE=x86_64-pc-linux-gnu \
-B build-${_arch} -S .
make -C build-${_arch}
done
}
package() {
for _arch in ${_architectures}; do
cd "${srcdir}/llvm-$pkgver.src/build-${_arch}"
make DESTDIR="${pkgdir}" install
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
done
}
|