blob: 829050ba0a21765aafe69de263afcc673f7860c8 (
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
|
pkgname=wasi-sdk-git
pkgver=r121.77ba98a
pkgrel=1
pkgdesc="WASI-enabled WebAssembly C/C++ toolchain (from git repo)"
arch=("x86_64")
license=('Apache')
depends=(clang lld)
makedepends=(cmake ninja python git)
source=('git+https://github.com/WebAssembly/wasi-sdk.git'
'git+https://git.savannah.gnu.org/git/config.git'
'git+https://github.com/llvm/llvm-project.git'
'git+https://github.com/WebAssembly/wasi-libc.git')
md5sums=('SKIP'
'SKIP'
'SKIP'
'SKIP')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
options=('!strip' 'staticlibs')
prepare() {
cd "$srcdir/${pkgname%-git}"
git submodule init
git config submodule.externals/config.url "$srcdir/config"
git config submodule.externals/llvm-project.url "$srcdir/llvm-project"
git config submodule.externals/wasi-libc.url "$srcdir/wasi-libc"
git submodule update
sed -ri 's/^DEBUG_PREFIX_MAP=/DEBUG_PREFIX_MAP=-fno-exceptions /' Makefile
}
pkgver() {
cd "$srcdir/${pkgname%-git}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "$srcdir/${pkgname%-git}"
CC="clang" \
CXX="clang++" \
LD="lld" \
make build strip
}
package() {
cd "$srcdir/${pkgname%-git}"
cp -dr --preserve=mode,timestamp ./build/install/* "${pkgdir}"
}
|