tools: Merge WASM_BUILD and WASM_BUILD_ONLY

By make WASM_BUILD as a three state variable: y , n or both.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2023-07-17 12:06:13 +08:00 • committed by Xiang Xiao
parent ff276e422f
commit 3d5183f404
2 changed files with 15 additions and 15 deletions

View file

@ -19,6 +19,9 @@
#
############################################################################
# Only build wasm if one of the following runtime is enabled
ifneq ($(CONFIG_INTERPRETERS_WAMR)$(CONFIG_INTERPRETERS_WASM)$(CONFIG_INTERPRETERS_TOYWASM),)
include $(APPDIR)$(DELIM)interpreters$(DELIM)wamr$(DELIM)Toolchain.defs
# wasi-sdk toolchain setting
@ -87,9 +90,14 @@ endef
endif # WASM_BUILD
# If called from Application.mk, WASM_BUILD is defined (y or n)
# Default values for WASM_BUILD, it's a three state variable:
# y - build wasm module only
# n - don't build wasm module
# both - build wasm module and native module
ifeq ($(WASM_BUILD),y)
WASM_BUILD ?= n
ifneq ($(WASM_BUILD),n)
WASM_INITIAL_MEMORY ?= 65536
STACKSIZE ?= $(CONFIG_DEFAULT_TASK_STACKSIZE)
@ -134,3 +142,4 @@ clean::
endif # WASM_BUILD
endif # WCC
endif