From 9985215ea27b059e83870d4f7f93918ae058c2dd Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Thu, 6 Jun 2019 19:02:26 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1648924 Reviewed-by: Patrick Georgi --- Makefile.toolchain | 1 + 1 file changed, 1 insertion(+) 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) -- cgit v1.2.1