Adding mem_stats build modifier.
This commit is contained in:
@@ -46,10 +46,10 @@ export TARGET_RELEASE_MODES = release
|
||||
export TARGET_PC_SYSTEMS = linux
|
||||
export TARGET_MCU_SYSTEMS = $(addprefix stm32f,3 4)
|
||||
|
||||
export TARGET_PC_MODS = musl sanitize valgrind cp cp_minimal \
|
||||
export TARGET_PC_MODS = musl sanitize valgrind cp cp_minimal mem_stats \
|
||||
musl-valgrind \
|
||||
valgrind-cp \
|
||||
musl-cp_minimal
|
||||
musl-cp_minimal musl-mem_stats musl-cp_minimal-mem_stats \
|
||||
|
||||
export TARGET_MCU_MODS = cp_minimal
|
||||
|
||||
|
||||
+11
-1
@@ -199,6 +199,12 @@ else
|
||||
OPTION_VALGRIND := disable
|
||||
endif
|
||||
|
||||
ifeq ($(filter mem_stats,$(TARGET_MODS)), mem_stats)
|
||||
OPTION_MEM_STATS := enable
|
||||
else
|
||||
OPTION_MEM_STATS := disable
|
||||
endif
|
||||
|
||||
#
|
||||
# Target CPU
|
||||
#
|
||||
@@ -282,7 +288,7 @@ GIT_HASH=$(shell git rev-parse HEAD)
|
||||
BUILD_DATE=$(shell date +'%d/%m/%Y')
|
||||
|
||||
CFLAGS_JERRY = $(CFLAGS_WARNINGS) $(CFLAGS_WERROR) $(CFLAGS_WFATAL_ERRORS)
|
||||
DEFINES_JERRY = -DMEM_STATS
|
||||
DEFINES_JERRY =
|
||||
|
||||
DEFINES_JERRY += -DJERRY_BUILD_DATE="\"$(BUILD_DATE)\"" \
|
||||
-DJERRY_COMMIT_HASH="\"$(GIT_HASH)\"" \
|
||||
@@ -392,6 +398,10 @@ else
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
endif
|
||||
|
||||
ifeq ($(OPTION_MEM_STATS),enable)
|
||||
DEFINES_JERRY += -DMEM_STATS
|
||||
endif
|
||||
|
||||
ifeq ($(OPTION_COLOR),enable)
|
||||
CFLAGS_COMMON += -fdiagnostics-color=always
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user