contrib/wasi-libc/Pkgfile

29 lines
778 B
Plaintext
Raw Normal View History

2021-12-11 12:27:57 +01:00
# Description: WASI libc implementation for WebAssembly
# URL: https://github.com/WebAssembly/wasi-libc
# Maintainer: John McQuah, jmcquah at disroot dot org
2021-12-11 12:27:57 +01:00
# Depends on: clang
name=wasi-libc
2023-08-11 12:19:35 +02:00
version=0.20230713
_commit=9f51a7102085ec6a6ced5778f0864c9af9f50000
2021-12-11 12:27:57 +01:00
release=1
2022-04-10 04:25:50 +02:00
source=(https://github.com/WebAssembly/wasi-libc/archive/$_commit/$name-$version.tar.gz
2022-09-19 00:36:09 +02:00
no-double-build.patch)
2022-02-16 21:06:09 +01:00
2021-12-11 12:27:57 +01:00
build() {
cd $name-$_commit
2022-09-19 00:36:09 +02:00
patch -p1 -i $SRC/no-double-build.patch
2022-04-10 04:25:50 +02:00
2022-09-19 00:36:09 +02:00
# Remove bulk memory support
# https://bugzilla.mozilla.org/show_bug.cgi?id=1773200#c4
make CC=clang BULK_MEMORY_SOURCES=
make INSTALL_DIR="$PKG"/usr/share/wasi-sysroot install
2021-12-11 12:27:57 +01:00
cd $PKG/usr/share/wasi-sysroot/lib/wasm32-wasi
for f in *.a; do
/usr/bin/llvm-ranlib $f
/usr/bin/llvm-strip --strip-debug $f
done
}