diff options
author | Yilun Lin <yllin@google.com> | 2019-05-24 11:18:26 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-06-03 01:11:04 -0700 |
commit | 49436b18d2a77b994fe76d8c2f070000e2cdb58a (patch) | |
tree | 327729dead0cf855fca17c067d499c66773ebe06 /chip/mchp | |
parent | 7ccb50f4352309813cffd98460bd7dcb48d4657f (diff) | |
download | chrome-ec-49436b18d2a77b994fe76d8c2f070000e2cdb58a.tar.gz |
Makefile: Replace flag -DX with -DX= to be supported by IS_ENABLED().
IS_ENABLED works for an empty-string-defined macro.
However, -D options default to define the macro to 1. This CL forces
those macros, such as BOARD_* CHIP_*, CORE_*, CHIP_VARIANT_* and
CHIP_FAMILIY_*, to be defined as an empty string, so that it can
be supported by IS_ENABLED macro.
TEST=use if(IS_ENABLED(BOARD_KRANE)) and see compilation success.
TEST=compares build directory w/ and w/o this CL, and see the .smap
are the same:
ls build/*/*/ec.*.smap | sed -e 's|build/||' | \
xargs -I{} diff -u -a build/{} build.new/{}
BUG=none
BRANCH=None
Change-Id: I96e2aa1cb5f3369e5e445a674595a9234f26707a
Signed-off-by: Yilun Lin <yllin@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1627840
Commit-Ready: Yilun Lin <yllin@chromium.org>
Tested-by: Yilun Lin <yllin@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'chip/mchp')
-rw-r--r-- | chip/mchp/build.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/mchp/build.mk b/chip/mchp/build.mk index c3883a0e6f..60682d2ed9 100644 --- a/chip/mchp/build.mk +++ b/chip/mchp/build.mk @@ -80,7 +80,7 @@ objs_lfw += $(out)/RW/common/version.o dirs-y+=chip/$(CHIP)/lfw # objs with -lfw suffix are to include lfw's gpio -$(out)/RW/%-lfw.o: private CC+=-I$(BDIR)/lfw -DLFW +$(out)/RW/%-lfw.o: private CC+=-I$(BDIR)/lfw -DLFW=$(EMPTY) # Remove the lto flag for the loader. It actually causes it to bloat in size. ifeq ($(CONFIG_LTO),y) $(out)/RW/%-lfw.o: private CFLAGS_CPU := $(filter-out -flto, $(CFLAGS_CPU)) |