diff options
author | Craig Hesling <hesling@chromium.org> | 2020-12-29 17:46:28 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-03 03:56:06 +0000 |
commit | 092a0eb3b9300d8f896a974fb6faaffac28a1610 (patch) | |
tree | f9e36dba00449a25c05268dfe262813ac762bc40 /Makefile.rules | |
parent | 4d1edeef0b4533f6a4a9814cf335998c5c03bf95 (diff) | |
download | chrome-ec-092a0eb3b9300d8f896a974fb6faaffac28a1610.tar.gz |
make/util: Modularize util make var building
The key objectives are to
* allow util targets to be added from outside of util/build.mk
(for adding tools per board, like ectool_servo)
* allow for easier conditioning of tool inclusion
(for auto adding tools based on characteristic, like CHIP_NPCX)
* reduce the number of tools being built
(we can remove irrelevant tools for some boards, like removing
stm32mon for npcx boards or iteflash for stm32 boards)
We have tons of boards in EC now. This takes a significant amount
of time to build, so we should be a bit more careful when adding
utils for all boards. This and subsequent changes sets the precedent
for selectivity.
This shifts the initialization/control to the board and baseboard's
build.mk and allows the util/build.mk to add items to these variables.
Ideally, we would use multiple variables to aggregate the utils
selection from the three sources (baseboard/build.mk, board/build.mk,
and util/build.mk), but I don't think the addition complexity is
currently warranted.
BRANCH=none
BUG=b:176500425
TEST=# Check all output artifacts from before and after this CL.
make clobber
make buildall STATIC_VERSION=1 -j
mv build build-orig
# Apply the change
make clobber
make buildall STATIC_VERSION=1 -j
diff <(find build-orig | sed 's/build-orig//' | sort) <(find build | sed 's/build//' | sort)
# Nothing should be different
Signed-off-by: Craig Hesling <hesling@chromium.org>
Change-Id: I23153850eda10fc1c88d386b9f3cd8296df9c6f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2606511
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/Makefile.rules b/Makefile.rules index ba73deeff6..08497a8d5f 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -10,12 +10,6 @@ FLATSIZE_FILE ?= .sizes.txt BUILD_DIR := $(firstword $(subst /, ,$(out))) -build-utils := $(foreach u,$(build-util-bin),$(out)/util/$(u)) -host-utils := $(foreach u,$(host-util-bin),$(out)/util/$(u)) -build-art := $(foreach u,$(build-util-art),$(out)/$(u)) -build-srcs := $(foreach u,$(build-util-bin),$(sort $($(u)-objs:%.o=util/%.c) $(wildcard util/$(u).c))) -host-srcs := $(foreach u,$(host-util-bin),$(sort $($(u)-objs:%.o=util/%.c) $(wildcard util/$(u).c))) - # Don't do a build test on the following boards: skip_boards = OWNERS cr50 host boards := $(filter-out $(skip_boards),$(notdir $(wildcard board/* private*/board/*))) |