diff options
author | Raul E Rangel <rrangel@chromium.org> | 2019-05-03 12:48:41 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-15 13:36:18 -0700 |
commit | aaba1d5efd51082d143ce2ac64e6caf9cb14d5e5 (patch) | |
tree | 2f270d3141f77192078c6578ef78648491477779 /Makefile.rules | |
parent | 1598a615eb150916ea323e212b87298c3a6fcfb6 (diff) | |
download | chrome-ec-aaba1d5efd51082d143ce2ac64e6caf9cb14d5e5.tar.gz |
ec: common: Make IS_ENABLED fail on unknown values
If IS_ENABLED is called with any unknown values, a compiler error will be
thrown. This change requires that the optimizer always be enabled,
otherwise errors will be thrown when a value is not defined.
BUG=none
BRANCH=none
TEST=make runtests TEST_LIST_HOST="is_enabled_error is_enabled"
Change-Id: I1b166311f81d07e48b3665f4bc0e9502d2ccc4c6
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1592728
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile.rules b/Makefile.rules index 419dd5a9ee..a86ac62869 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -94,7 +94,8 @@ cmd_cxx_to_host = $(HOSTCXX) -std=c++0x $(COMMON_WARN) $(HOST_CXXFLAGS)\ cmd_o_to_a = $(AR) rcs $@ $^ cmd_host_test = $(MAKE) --no-print-directory BOARD=host PROJECT=$* \ V=$(V) out=build/host/$* TEST_BUILD=y EMU_BUILD=y CROSS_COMPILE= \ - $(TEST_FLAG) build/host/$*/$*.exe + $(if $(TEST_SCRIPT),TEST_SCRIPT=$(TEST_SCRIPT)) $(TEST_FLAG) \ + build/host/$*/$*.exe cmd_run_host_test = ./util/run_host_test $* $(silent) # generate new version.h, compare if it changed and replace if so cmd_version = ./util/getversion.sh > $@.tmp && \ @@ -122,6 +123,7 @@ cmd_emmc_bootblock = $(out)/util/gen_emmc_transfer_data \ $(if $(BOOTBLOCK),-i $(BOOTBLOCK)) -o $@ cmd_ipi_table = $(out)/util/gen_ipi_table $@ +cmd_cp_script = cp "$<" "$@" && chmod +x "$@" # commands for RSA signature: rwsig does not need to sign the whole image # (it signs the RW part separately). usbpd1 type needs to sign the final image. @@ -471,11 +473,16 @@ $(out)/%.smap: $(out)/%.elf ifeq ($(TEST_FUZZ),y) $(out)/$(PROJECT).exe: $(rw-only-objs) $(out)/libec.a $(call quiet,fuzz_exe,EXE ) +else ifneq ($(TEST_SCRIPT),) +$(out)/$(PROJECT).exe: test/$(TEST_SCRIPT) | $(ro-objs) + $(call quiet,cp_script,CP ) else $(out)/$(PROJECT).exe: $(ro-objs) $(call quiet,exe,EXE ) endif +$(out)/RO/%.o.cmd:%.c + $(file > $@,$(subst .o.cmd,.o,$(cmd_c_to_o))) $(out)/RO/%.o:%.c $(call quiet,c_to_o,CC ) $(out)/RW/%.o:%.c |