summaryrefslogtreecommitdiff
path: root/Makefile.toolchain
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2013-04-04 21:38:22 +0800
committerChromeBot <chrome-bot@google.com>2013-04-10 01:08:45 -0700
commit8a06eb1d35cb460fb5669c720262d437f54b0101 (patch)
tree9a029fc001ed24bf023f89d35b5696926085e539 /Makefile.toolchain
parent64ae15f3b3c743a8b98af7754871c0ba7470becd (diff)
downloadchrome-ec-8a06eb1d35cb460fb5669c720262d437f54b0101.tar.gz
Only includes necessary tasks for test binaries
This changes current TASK() syntax to TASK_BASE() and TASK_NORMAL(), where TASK_BASE is necessary for the EC to boot on a board and TASK_NORMAL represents the task that can be removed in a test binary. Tasks introduced by a test should be listed as TASK_TEST(). Note that this CL breaks current tests (many of them are broken anyway), which will be fixed in up coming CLs. BUG=chrome-os-partner:18598 TEST=Build link/bds/spring/snow/daisy/mccroskey. (mccroskey failed for unrelated issue) BRANCH=none Change-Id: Ic645cdae0906ed21dc473553f1f43c2537ec4bb9 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47531
Diffstat (limited to 'Makefile.toolchain')
-rw-r--r--Makefile.toolchain12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index ddf8452210..fd64ff5c26 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -25,11 +25,13 @@ CFLAGS_WARN=-Wall -Werror -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack
CFLAGS_DEBUG= -g
CFLAGS_INCLUDE=$(foreach i,$(includes),-I$(i) )
-CFLAGS_DEFINE=-DOUTDIR=$(out) -DCHIP=$(CHIP) -DTASKFILE=$(PROJECT).tasklist \
- -DBOARD=$(BOARD) -DBOARD_$(BOARD) -DCORE=$(CORE) -DCHIP_$(CHIP) \
- -DCHIP_VARIANT=$(CHIP_VARIANT) -DCHIP_VARIANT_$(CHIP_VARIANT) \
- -DPROJECT=$(PROJECT)
-CPPFLAGS=$(CFLAGS_DEFINE) $(CFLAGS_INCLUDE) $(EXTRA_CFLAGS)
+CFLAGS_TEST=$(if $(TEST_BUILD),-DTEST_BUILD \
+ -DTEST_TASKFILE=$(PROJECT).tasklist,)
+CFLAGS_DEFINE=-DOUTDIR=$(out) -DCHIP=$(CHIP) -DBOARD_TASKFILE=ec.tasklist \
+ -DBOARD=$(BOARD) -DBOARD_$(BOARD) -DCORE=$(CORE) \
+ -DCHIP_$(CHIP) -DCHIP_VARIANT=$(CHIP_VARIANT) \
+ -DCHIP_VARIANT_$(CHIP_VARIANT) -DPROJECT=$(PROJECT)
+CPPFLAGS=$(CFLAGS_DEFINE) $(CFLAGS_INCLUDE) $(CFLAGS_TEST) $(EXTRA_CFLAGS)
CFLAGS=$(CPPFLAGS) $(CFLAGS_CPU) $(CFLAGS_DEBUG) $(CFLAGS_WARN) $(CFLAGS_y)
BUILD_CFLAGS=$(CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN)
HOST_CFLAGS=$(CPPFLAGS) -O3 $(CFLAGS_DEBUG) $(CFLAGS_WARN)