This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 74db48527 tools: Raise error if wasm module build failed
74db48527 is described below
commit 74db485277174a111bbb84ffd852280c9358cb62
Author: Huang Qi <[email protected]>
AuthorDate: Mon Jul 31 17:22:08 2023 +0800
tools: Raise error if wasm module build failed
Signed-off-by: Huang Qi <[email protected]>
---
tools/Wasm.mk | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/Wasm.mk b/tools/Wasm.mk
index 6f146765e..77497c19d 100644
--- a/tools/Wasm.mk
+++ b/tools/Wasm.mk
@@ -81,8 +81,11 @@ define LINK_WASM
$(eval INITIAL_MEMORY=$(shell echo $(notdir $(bin)) | cut -d'#'
-f2)) \
$(eval STACKSIZE=$(shell echo $(notdir $(bin)) | cut -d'#' -f3)) \
$(eval PROGNAME=$(shell echo $(notdir $(bin)) | cut -d'#' -f1)) \
- $(shell $(WCC) $(bin) $(WBIN) $(WCFLAGS) $(WLDFLAGS)
$(COMPILER_RT_LIB) \
- -o $(APPDIR)$(DELIM)wasm$(DELIM)$(PROGNAME).wasm) \
+ $(eval RETVAL=$(shell $(WCC) $(bin) $(WBIN) $(WCFLAGS) $(WLDFLAGS)
$(COMPILER_RT_LIB) \
+ -o $(APPDIR)$(DELIM)wasm$(DELIM)$(PROGNAME).wasm || echo 1;)) \
+ $(if $(RETVAL), \
+ $(error wasm build failed for $(PROGNAME).wasm) \
+ ) \
$(call WAMR_AOT_COMPILE) \
) \
)