From ec49ea8e1737e38b2ab704475a87d0580245dc4e Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Wed, 23 Aug 2023 21:22:44 +0100 Subject: 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 --- shared.mk | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit