summaryrefslogtreecommitdiff
path: root/Makefile.toolchain
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2019-06-06 19:02:26 -0700
committerCommit Bot <commit-bot@chromium.org>2019-06-07 21:23:51 +0000
commit9985215ea27b059e83870d4f7f93918ae058c2dd (patch)
tree1d4b313ced7931d635dc4df4c5588be2fd2f67bb /Makefile.toolchain
parent8d395e29b571878a3ed71652454621b7338b8343 (diff)
downloadchrome-ec-9985215ea27b059e83870d4f7f93918ae058c2dd.tar.gz
Makefile: add -ffat-lto-objects to CFLAGS
This command line option causes .o files to include additional information and seems to be triggering a more thorough code analysis. In particular, the uninitalized variable use cases previously missed trigger compilation warnings when this option is enabled. Generated code size for the Cr50 target does not change. BRANCH=cr50, cr50-mp BUG=b:134623681 TEST=make buildall -j Change-Id: I1d916f0e6592757a073ae44e8e38c8a60384d576 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1648924 Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Diffstat (limited to 'Makefile.toolchain')
-rw-r--r--Makefile.toolchain1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index 857f32158d..cd41a4c1c6 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -103,6 +103,7 @@ CFLAGS=$(CPPFLAGS) $(CFLAGS_CPU) $(CFLAGS_DEBUG) $(COMMON_WARN) $(CFLAGS_y)
CFLAGS+= -ffunction-sections -fshort-wchar
CFLAGS+= -fno-delete-null-pointer-checks
ifneq ($(cc-name),clang)
+CFLAGS+= -ffat-lto-objects
CFLAGS+= -fconserve-stack
endif
CFLAGS+= -DCHROMIUM_EC=$(EMPTY)