tools: Emit map file for wasm module

Emit map file like NuttX's `System.map` for more
debug information.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2023-08-18 16:48:37 +08:00 committed by Xiang Xiao
parent 733b6de818
commit 3129b7a465

View File

@ -87,6 +87,7 @@ define LINK_WASM
$(eval STACKSIZE=$(shell echo $(notdir $(bin)) | cut -d'#' -f3)) \
$(eval PROGNAME=$(shell echo $(notdir $(bin)) | cut -d'#' -f1)) \
$(eval RETVAL=$(shell $(WCC) $(bin) $(WBIN) $(WCFLAGS) $(WLDFLAGS) $(COMPILER_RT_LIB) \
-Wl,--Map=$(APPDIR)$(DELIM)wasm$(DELIM)$(PROGNAME).map \
-o $(APPDIR)$(DELIM)wasm$(DELIM)$(PROGNAME).wasm || echo 1;)) \
$(if $(RETVAL), \
$(error wasm build failed for $(PROGNAME).wasm) \