wamr: Add shared memory and memory tracing config (#835)

Applied on the nuttx platform, some memory configurations are added,
and aot and interp can be completely closed or opened, thereby reducing
the flash size.
This commit is contained in:
dslk 2021-11-16 15:54:46 +08:00 committed by GitHub
parent 3ded9ece83
commit 5d48a18614
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,14 +113,54 @@ else
CFLAGS += -DWASM_ENABLE_AOT=0
endif
CFLAGS += -DWASM_ENABLE_INTERP=1
CSRCS += wasm_runtime.c
ifeq ($(CONFIG_INTERPRETERS_WAMR_FAST),y)
ifeq ($(CONFIG_INTERPRETERS_WAMR_FAST), y)
CFLAGS += -DWASM_ENABLE_FAST_INTERP=1
CFLAGS += -DWASM_ENABLE_INTERP=1
CSRCS += wasm_interp_fast.c
CSRCS += wasm_runtime.c
else
CFLAGS += -DWASM_ENABLE_FAST_INTERP=0
endif
ifeq ($(CONFIG_INTERPRETERS_WAMR_CLASSIC), y)
CFLAGS += -DWASM_ENABLE_INTERP=1
CSRCS += wasm_interp_classic.c
CSRCS += wasm_runtime.c
endif
ifeq ($(findstring y,$(CONFIG_INTERPRETERS_WAMR_FAST)$(CONFIG_INTERPRETERS_WAMR_CLASSIC)), y)
ifeq ($(CONFIG_INTERPRETERS_WAMR_MINILOADER),y)
CFLAGS += -DWASM_ENABLE_MINI_LOADER=1
CSRCS += wasm_mini_loader.c
else
CFLAGS += -DWASM_ENABLE_MINI_LOADER=0
CSRCS += wasm_loader.c
endif
endif
ifeq ($(CONFIG_INTERPRETERS_WAMR_SHARED_MEMORY),y)
CFLAGS += -DWASM_ENABLE_SHARED_MEMORY=1
CSRCS += wasm_shared_memory.c
else
CFLAGS += -DWASM_ENABLE_SHARED_MEMORY=0
endif
ifeq ($(CONFIG_INTERPRETERS_WAMR_BULK_MEMORY),y)
CFLAGS += -DWASM_ENABLE_BULK_MEMORY=1
else
CFLAGS += -DWASM_ENABLE_BULK_MEMORY=0
endif
ifeq ($(CONFIG_INTERPRETERS_WAMR_MEMORY_PROFILING),y)
CFLAGS += -DWASM_ENABLE_MEMORY_PROFILING=1
else
CFLAGS += -DWASM_ENABLE_MEMORY_PROFILING=0
endif
ifeq ($(CONFIG_INTERPRETERS_WAMR_MEMORY_TRACING),y)
CFLAGS += -DWASM_ENABLE_MEMORY_TRACING=1
else
CFLAGS += -DWASM_ENABLE_MEMORY_TRACING=0
endif
ifeq ($(CONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN),y)
@ -150,14 +190,6 @@ else
CFLAGS += -DWASM_ENABLE_LIB_PTHREAD=0
endif
ifeq ($(CONFIG_INTERPRETERS_WAMR_MINILOADER),y)
CFLAGS += -DWASM_ENABLE_MINI_LOADER=1
CSRCS += wasm_mini_loader.c
else
CFLAGS += -DWASM_ENABLE_MINI_LOADER=0
CSRCS += wasm_loader.c
endif
ifeq ($(CONFIG_INTERPRETERS_WAMR_DISABLE_HW_BOUND_CHECK),y)
CFLAGS += -DWASM_DISABLE_HW_BOUND_CHECK=1
else