summaryrefslogtreecommitdiff
path: root/Makefile.toolchain
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2019-05-03 12:48:41 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-05-15 13:36:18 -0700
commitaaba1d5efd51082d143ce2ac64e6caf9cb14d5e5 (patch)
tree2f270d3141f77192078c6578ef78648491477779 /Makefile.toolchain
parent1598a615eb150916ea323e212b87298c3a6fcfb6 (diff)
downloadchrome-ec-aaba1d5efd51082d143ce2ac64e6caf9cb14d5e5.tar.gz
ec: common: Make IS_ENABLED fail on unknown values
If IS_ENABLED is called with any unknown values, a compiler error will be thrown. This change requires that the optimizer always be enabled, otherwise errors will be thrown when a value is not defined. BUG=none BRANCH=none TEST=make runtests TEST_LIST_HOST="is_enabled_error is_enabled" Change-Id: I1b166311f81d07e48b3665f4bc0e9502d2ccc4c6 Signed-off-by: Raul E Rangel <rrangel@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1592728 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'Makefile.toolchain')
-rw-r--r--Makefile.toolchain2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index 338caf0672..c7ab5ac106 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -92,6 +92,8 @@ HOST_CPPFLAGS=$(CFLAGS_DEFINE) $(CFLAGS_INCLUDE) $(CFLAGS_TEST) \
ifneq ($(BOARD),host)
CPPFLAGS+=-ffreestanding -fno-builtin -nostdinc -nostdlib
CPPFLAGS+=-Ibuiltin/
+else
+CPPFLAGS+=-Og
endif
CFLAGS=$(CPPFLAGS) $(CFLAGS_CPU) $(CFLAGS_DEBUG) $(COMMON_WARN) $(CFLAGS_y)
CFLAGS+= -ffunction-sections -fshort-wchar