summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2023-08-23 21:22:44 +0100
committerAndrew Clayton <a.clayton@nginx.com>2023-08-23 21:29:25 +0100
commitec49ea8e1737e38b2ab704475a87d0580245dc4e (patch)
tree401143127fef5d495b1d1b6a502dc6b82f310d2a
parent246d9e630867378d2796adf18c6e7943c8e84dca (diff)
downloadunit-wasm-ec49ea8e1737e38b2ab704475a87d0580245dc4e.tar.gz
unit-wasm-ec49ea8e1737e38b2ab704475a87d0580245dc4e.tar.bz2
shared.mk: Ensure WASI_SYSROOT is exported to the environment
If you don't have WASI_SYSROOT set in the shell and you don't specify it in the make command, then make will try and find the wasi-sysroot in some known locations and then set the WASI_SYSROOT accordingly. However in this case (no shell variable and not specified in the make command) then when it comes to building the rust stuff, cargo build fails when trying to generate the bindings as it needs the wasi-sysroot but doesn't pick it up from the shell environment. Fix this by exporting WASI_SYSROOT from shared.mk Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
-rw-r--r--shared.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/shared.mk b/shared.mk
index 5c2e112..e2e7300 100644
--- a/shared.mk
+++ b/shared.mk
@@ -10,6 +10,8 @@ else ifneq ("$(wildcard /usr/local/share/wasi-sysroot)", "")
WASI_SYSROOT ?= /usr/local/share/wasi-sysroot
endif
+export WASI_SYSROOT
+
# By default compiler etc output is hidden, use
# make V=1 ...
# to show it