summaryrefslogtreecommitdiffhomepage
path: root/pkg/contrib/src/wasmtime/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/contrib/src/wasmtime/Makefile')
-rw-r--r--pkg/contrib/src/wasmtime/Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/pkg/contrib/src/wasmtime/Makefile b/pkg/contrib/src/wasmtime/Makefile
index 11797fee..2a6e8abf 100644
--- a/pkg/contrib/src/wasmtime/Makefile
+++ b/pkg/contrib/src/wasmtime/Makefile
@@ -11,10 +11,6 @@ else
CARGO = $(error Cargo (Rust package manager) not found)
endif
-ifeq ($(shell uname -s),Linux)
-WASMTIME_ARGS=-Clink-arg=-Wl,-soname,libwasmtime.so
-endif
-
$(TARBALLS)/wasmtime-v$(WASMTIME_VERSION)-src.tar.gz:
$(call download_pkg,$(WASMTIME_URL),wasmtime)
@@ -25,6 +21,11 @@ wasmtime: wasmtime-v$(WASMTIME_VERSION)-src.tar.gz .sum-wasmtime
$(MOVE)
.wasmtime: wasmtime
- cd $< && $(CARGO) rustc --release -p wasmtime-c-api -- $(WASMTIME_ARGS)
- cp $</crates/c-api/wasm-c-api/include/wasm.h $</crates/c-api/include/
+ cd $< && cmake \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -S crates/c-api \
+ -B target/c-api \
+ --install-prefix "$(TOPSRC)/wasmtime/artifacts"
+ cd $< && cmake --build target/c-api
+ cd $< && cmake --install target/c-api
touch $@