summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2024-09-06 21:08:25 +0100
committerAndrew Clayton <a.clayton@nginx.com>2024-09-06 21:21:08 +0100
commiteffba2339986e1c46163f8c8ae1311e94367bbee (patch)
tree26735c5bf06be2b4cff31c056ffe8ef476bad64e
parentd526db9148ed04b2dfdfd74a6de25d8b7d7e7d90 (diff)
downloadproject_blackbird-effba2339986e1c46163f8c8ae1311e94367bbee.tar.gz
project_blackbird-effba2339986e1c46163f8c8ae1311e94367bbee.tar.bz2
w-h/0.2.0/shared.mk: Use the right adaptor
Now that the wasi-http 0.2.0 components are using a shared Makefile, make the echo-request component use the proxy adaptor while the rest use the reactor adaptor. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to '')
-rw-r--r--c/wasi-http/0.2.0/echo-request/Makefile2
-rw-r--r--c/wasi-http/0.2.0/shared.mk4
2 files changed, 5 insertions, 1 deletions
diff --git a/c/wasi-http/0.2.0/echo-request/Makefile b/c/wasi-http/0.2.0/echo-request/Makefile
index 110d078..5d24619 100644
--- a/c/wasi-http/0.2.0/echo-request/Makefile
+++ b/c/wasi-http/0.2.0/echo-request/Makefile
@@ -1 +1,3 @@
+ADAPTOR_TYPE = proxy
+
include ../shared.mk
diff --git a/c/wasi-http/0.2.0/shared.mk b/c/wasi-http/0.2.0/shared.mk
index d5a7898..7e43601 100644
--- a/c/wasi-http/0.2.0/shared.mk
+++ b/c/wasi-http/0.2.0/shared.mk
@@ -7,6 +7,8 @@ endif
export WASI_SYSROOT
+ADAPTOR_TYPE ?= reactor
+
CC = clang
CFLAGS = -Wall -Wextra --target=wasm32-wasi --sysroot=$(WASI_SYSROOT)
LDFLAGS = -Wl,--no-entry,--export=__heap_base,--export=__data_end,--export=malloc,--export=free,--stack-first,-z,stack-size=$$((8*1024*1024)) -mexec-model=reactor --rtlib=compiler-rt
@@ -23,7 +25,7 @@ module.wasm: bindgen
.PHONY:
component.wasm: module.wasm
- /home/andrew/src/c/wasm/git/wasm-tools/target/release/wasm-tools component new module.wasm --adapt ../../adaptors/24.0.0/wasi_snapshot_preview1.proxy.wasm -o component.wasm
+ /home/andrew/src/c/wasm/git/wasm-tools/target/release/wasm-tools component new module.wasm --adapt ../../adaptors/24.0.0/wasi_snapshot_preview1.$(ADAPTOR_TYPE).wasm -o component.wasm
clean:
rm -f component.wasm module.wasm proxy*