diff options
| author | Arshia Ghafoori <arshia001@live.com> | 2023-08-24 10:26:06 +0400 |
|---|---|---|
| committer | Arshia Ghafoori <arshia001@live.com> | 2023-08-24 10:26:06 +0400 |
| commit | 5fe27df27ec6d87952ea65c26a03218934e74137 (patch) | |
| tree | 94997995815391dc139273dd69f47e447affb73a | |
| parent | 172431937dab4353559cd36828de375d0659577d (diff) | |
Add clang builtin symbols to libc.a
| -rw-r--r-- | Makefile | 7 | ||||
| -rwxr-xr-x | build32.sh | 2 | ||||
| -rw-r--r-- | tools/append-builtins/wasm32-wasi.mri | 5 |
3 files changed, 14 insertions, 0 deletions
@@ -515,6 +515,13 @@ wasix-headers: cargo run --manifest-path tools/wasix-headers/Cargo.toml generate-libc post-finish: finish +ifeq ($(TARGET_TRIPLE), wasm32-wasi) + cd $(SYSROOT)/lib/$(TARGET_TRIPLE) && \ + mv libc.a libc-old.a && \ + $(AR) -M < ../../../tools/append-builtins/$(TARGET_TRIPLE).mri && \ + rm libc-old.a +endif + rm -f sysroot/lib/wasm32-wasi/libc-printscan-log-double.a rsync -rtvu --delete ./sysroot/ ./sysroot32/ @@ -9,6 +9,8 @@ git reset --hard git pull origin main || true cd ../../.. +make clean + # Build the extensions cargo run --manifest-path tools/wasix-headers/Cargo.toml generate-libc cp -f libc-bottom-half/headers/public/wasi/api.h libc-bottom-half/headers/public/wasi/api_wasix.h diff --git a/tools/append-builtins/wasm32-wasi.mri b/tools/append-builtins/wasm32-wasi.mri new file mode 100644 index 0000000..dd2765f --- /dev/null +++ b/tools/append-builtins/wasm32-wasi.mri @@ -0,0 +1,5 @@ +create libc.a +addlib libc-old.a +addlib ../../../libclang_rt.builtins-wasm32.a +save +end
\ No newline at end of file |
