summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorZheng Luo2021-02-28 00:15:50 -0500
committerZheng Luo2021-02-28 00:17:06 -0500
commit70dcbf376d0eb7afabcf9bc6d24efba0c1ad5724 (patch)
treeb4470da9cae6a5f0fe6c4e1371ede57c971dec8a
downloadaur-wasi-libc-git.tar.gz
initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD29
-rw-r--r--wasi-libc.install3
4 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..41790a86faff
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = wasi-libc-git
+ pkgdesc = libc for WebAssembly programs built on top of WASI system calls (from git repo)
+ pkgver = r208.2b7e73a
+ pkgrel = 1
+ install = wasi-libc.install
+ arch = x86_64
+ license = Apache
+ makedepends = git
+ depends = llvm
+ depends = clang
+ provides = wasi-libc
+ conflicts = wasi-libc
+ options = !strip
+ options = staticlibs
+ source = git+https://github.com/WebAssembly/wasi-libc.git#branch=main
+ md5sums = SKIP
+
+pkgname = wasi-libc-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..147662ba2f63
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg
+/src
+/*.pkg.*
+/wasi-libc
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..05dde7b0b1f8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+pkgname="wasi-libc-git"
+pkgver=r208.2b7e73a
+pkgrel=1
+pkgdesc="libc for WebAssembly programs built on top of WASI system calls (from git repo)"
+arch=("x86_64")
+license=('Apache')
+depends=(llvm clang)
+source=('git+https://github.com/WebAssembly/wasi-libc.git#branch=main')
+md5sums=('SKIP')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+makedepends=('git')
+install=wasi-libc.install
+options=('!strip' 'staticlibs')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}"
+ make WASM_CC=clang
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}"
+ make install WASM_CC=clang INSTALL_DIR="$pkgdir"/opt/wasi-libc
+}
diff --git a/wasi-libc.install b/wasi-libc.install
new file mode 100644
index 000000000000..cec97aa58532
--- /dev/null
+++ b/wasi-libc.install
@@ -0,0 +1,3 @@
+post_install() {
+ echo "Use this lib with clang --target=wasm32-unknown-wasi --sysroot /opt/wasi-libc"
+}