diff options
-rw-r--r-- | core/arch/arm/arm.mk | 9 | ||||
-rw-r--r-- | mk/config.mk | 12 |
2 files changed, 12 insertions, 9 deletions
diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk index d556f54c..5049c114 100644 --- a/core/arch/arm/arm.mk +++ b/core/arch/arm/arm.mk @@ -149,17 +149,8 @@ arm64-platform-cflags-no-hard-float ?= -mgeneral-regs-only arm64-platform-cflags-hard-float ?= arm64-platform-cflags-generic := -mstrict-align $(call cc-option,-mno-outline-atomics,) -ifeq ($(DEBUG),1) -# For backwards compatibility -$(call force,CFG_CC_OPT_LEVEL,0) -$(call force,CFG_DEBUG_INFO,y) -endif - -# Optimize for size by default, usually gives good performance too -CFG_CC_OPT_LEVEL ?= s platform-cflags-optimization ?= -O$(CFG_CC_OPT_LEVEL) -CFG_DEBUG_INFO ?= y ifeq ($(CFG_DEBUG_INFO),y) platform-cflags-debug-info ?= -g3 platform-aflags-debug-info ?= -g diff --git a/mk/config.mk b/mk/config.mk index 361f7452..46fd1e4f 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -40,6 +40,18 @@ PYTHON3 ?= python3 # Define DEBUG=1 to compile without optimization (forces -O0) # DEBUG=1 +ifeq ($(DEBUG),1) +# For backwards compatibility +$(call force,CFG_CC_OPT_LEVEL,0) +$(call force,CFG_DEBUG_INFO,y) +endif + +# CFG_CC_OPT_LEVEL sets compiler optimization level passed with -O directive. +# Optimize for size by default, usually gives good performance too. +CFG_CC_OPT_LEVEL ?= s + +# Enabling CFG_DEBUG_INFO makes debug information embedded in core. +CFG_DEBUG_INFO ?= y # If y, enable debug features of the TEE core (assertions and lock checks # are enabled, panic and assert messages are more verbose, data and prefetch |