summaryrefslogtreecommitdiff
path: root/mk/toolchain.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/toolchain.mk')
-rw-r--r--mk/toolchain.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/mk/toolchain.mk b/mk/toolchain.mk
index 0e8bacb..a8061ed 100644
--- a/mk/toolchain.mk
+++ b/mk/toolchain.mk
@@ -38,6 +38,7 @@ TARGETOBJDUMP := $(embtk_tools)/bin/$(STRICT_GNU_TARGET)-objdump
TARGETOBJCOPY := $(embtk_tools)/bin/$(STRICT_GNU_TARGET)-objcopy
__kconfig-cflags := $(strip $(CONFIG_EMBTK_TARGET_COMPILER_CFLAGS))
__TARGET_CFLAGS := $(subst ",,$(__kconfig-cflags))
+__TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_NONE_OPTIMIZED),-O0)
__TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_SIZE_OPTIMIZED),-Os)
__TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_SPEED_OPTIMIZED),-O3)
__TARGET_CFLAGS += $(if $(CONFIG_EMBTK_TARGET_WITH_DEBUG_DATA),-g)