diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-08-08 12:58:54 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-08-08 21:51:36 +0000 |
commit | 5e02b5c985f51ce5ace8b772fe396baea18b8550 (patch) | |
tree | b83e173302cc0f43ddbd44ece05d1503ac097aba /Makefile.toolchain | |
parent | e59daf9807124fb5752781e2e51caa3fe1fe7e89 (diff) | |
download | chrome-ec-5e02b5c985f51ce5ace8b772fe396baea18b8550.tar.gz |
ec: Set HOSTGCOV correctly for each compiler
Set the host gcov correctly, if we are using gcc, then use gcov,
otherwise use llvm-cov for clang.
Remove the workaround in .gitlab-ci.yml
BRANCH=None
BUG=None
TEST=make clobber && make TEST_FLAG=TEST_COVERAGE=y \
build/coverage/usb_pe_drp_noextended.info V=1 CC=clang
TEST=make clobber && make TEST_FLAG=TEST_COVERAGE=y \
build/coverage/usb_pe_drp_noextended.info V=1
TEST=(in docker) make -j8 CRYPTOC_DIR="${MODULES_DIR}/cryptoc" \
CROSS_COMPILE_arm=/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi- \
TEST_FLAG=TEST_COVERAGE=y build/coverage/usb_pe_drp_noextended.info V=1
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: Ic97d425e35e25bea07e29c4736730fd21dd72f5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3818125
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'Makefile.toolchain')
-rw-r--r-- | Makefile.toolchain | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain index fcb2dd4b00..4735776bf9 100644 --- a/Makefile.toolchain +++ b/Makefile.toolchain @@ -61,7 +61,11 @@ HOSTCXX?=$(CCACHE) $(HOST_CROSS_COMPILE)clang++ HOST_PKG_CONFIG?=$(HOST_CROSS_COMPILE)pkg-config PROTOC?=protoc GCOV=$(CROSS_COMPILE)gcov +ifeq ($(cc-name),gcc) +HOSTGCOV=$(HOST_CROSS_COMPILE)gcov +else HOSTGCOV=$(CURDIR)/util/llvm-gcov.sh +endif C_WARN = -Wstrict-prototypes -Wdeclaration-after-statement -Wno-pointer-sign COMMON_WARN = -Wall -Wundef -Werror-implicit-function-declaration \ |