@@ -22,13 +22,13 @@ TARGET_TRIPLE ?= wasm32-wasi
2222
2323LIBC_TEST_URL ?= https://github.com/bytecodealliance/libc-test
2424LIBC_TEST = $(DOWNDIR ) /libc-test
25- LIBRT_URL ?= https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-16 /libclang_rt.builtins-wasm32-wasi-16 .0.tar.gz
26- LIBRT = $(DOWNDIR ) /lib/wasi/ libclang_rt.builtins-wasm32.a
27- WASMTIME_URL ?= https://github.com/bytecodealliance/wasmtime/releases/download/v17 .0.0 /wasmtime-v17 .0.0 -x86_64-linux.tar.xz
25+ LIBRT_URL ?= https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24 /libclang_rt.builtins-wasm32-wasi-24 .0.tar.gz
26+ LIBRT = $(DOWNDIR ) /libclang_rt.builtins-wasm32.a
27+ WASMTIME_URL ?= https://github.com/bytecodealliance/wasmtime/releases/download/v26 .0.1 /wasmtime-v26 .0.1 -x86_64-linux.tar.xz
2828WASMTIME = $(DOWNDIR ) /$(shell basename $(WASMTIME_URL ) .tar.xz) /wasmtime
29- WASM_TOOLS_URL ?= https://github.com/bytecodealliance/wasm-tools/releases/download/wasm-tools-1.0.54 /wasm-tools-1.0.54 -x86_64-linux.tar.gz
29+ WASM_TOOLS_URL ?= https://github.com/bytecodealliance/wasm-tools/releases/download/v1.220.0 /wasm-tools-1.220.0 -x86_64-linux.tar.gz
3030WASM_TOOLS = $(DOWNDIR ) /$(shell basename $(WASM_TOOLS_URL ) .tar.gz) /wasm-tools
31- ADAPTER_URL ?= https://github.com/bytecodealliance/wasmtime/releases/download/v17 .0.0 /wasi_snapshot_preview1.command.wasm
31+ ADAPTER_URL ?= https://github.com/bytecodealliance/wasmtime/releases/download/v26 .0.1 /wasi_snapshot_preview1.command.wasm
3232ADAPTER = $(DOWNDIR ) /wasi_snapshot_preview1.command.wasm
3333
3434TO_DOWNLOAD = $(LIBC_TEST ) $(LIBRT ) $(WASMTIME )
@@ -44,10 +44,11 @@ $(DOWNDIR):
4444$(LIBC_TEST ) : | $(DOWNDIR )
4545 git clone --depth 1 $(LIBC_TEST_URL ) $@
4646
47- # TODO install target to place into...
47+ # TODO: add install target to copy builtins library directly into a Clang
48+ # installation.
4849$(LIBRT ) : | $(DOWNDIR )
4950 wget --no-clobber --directory-prefix=$(DOWNDIR ) $(LIBRT_URL )
50- tar --extract --file=$(DOWNDIR ) /$(shell basename $(LIBRT_URL ) ) --directory=$(DOWNDIR ) /
51+ tar --extract --file=$(DOWNDIR ) /$(shell basename $(LIBRT_URL ) ) --strip-components=1 -- directory=$(DOWNDIR ) /
5152
5253$(WASMTIME ) : | $(DOWNDIR )
5354 wget --no-clobber --directory-prefix=$(DOWNDIR ) $(WASMTIME_URL )
@@ -61,7 +62,7 @@ $(ADAPTER): | $(DOWNDIR)
6162 wget --no-clobber --directory-prefix=$(DOWNDIR ) $(ADAPTER_URL )
6263
6364clean ::
64- rm -rf download
65+ rm -rf $( DOWNDIR )
6566
6667# #### BUILD ####################################################################
6768
@@ -145,7 +146,7 @@ endif
145146# due to a missing `libclang_rt.builtins-wasm32.a` in the Clang lib directory.
146147# This location is system-dependent, but could be fixed by something like:
147148# $ sudo mkdir /usr/lib64/clang/14.0.5/lib/wasi
148- # $ sudo cp download/lib/wasi/ libclang_rt.builtins-wasm32.a /usr/lib64/clang/14.0.5/lib/wasi/
149+ # $ sudo cp download/libclang_rt.builtins-wasm32.a /usr/lib64/clang/14.0.5/lib/wasi/
149150build : download $(WASMS )
150151
151152$(WASMS ) : | $(OBJDIRS )
0 commit comments