summaryrefslogtreecommitdiff
path: root/Makefile.toolchain
diff options
context:
space:
mode:
authorJeremy Bettis <jbettis@google.com>2021-09-20 16:12:32 -0600
committerCommit Bot <commit-bot@chromium.org>2021-09-27 20:23:23 +0000
commitc3fb51caf35a068e4030fc95ec65c20de7c789ce (patch)
tree76c53c6649c32e016ede66d67b79420ff3e60883 /Makefile.toolchain
parent12683de751a5b00a9dea2146313cc25dae86182f (diff)
downloadchrome-ec-c3fb51caf35a068e4030fc95ec65c20de7c789ce.tar.gz
ec: Set GCOV tool for cross compile
Use the right gcov tool for cross compile and host builds. The llvm-cov tool is sort of magical and can handle both llvm and gcc output, but that is only in the chroot, and so on gitlab we need to pick the right gcov for each platform. BRANCH=None BUG=None TEST=in docker: make -j CRYPTOC_DIR="${MODULES_DIR}/cryptoc" \ FTDIVERSION=1 HOSTGCOV='gcov' \ CROSS_COMPILE_arm=/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi- \ coverage Change-Id: Ie95032a4c0706b2bd49574df03e93dcbec7c3eed Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3171942 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'Makefile.toolchain')
-rw-r--r--Makefile.toolchain2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index fbd6af1276..ecfaeb6dd6 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -47,6 +47,8 @@ HOSTCC?=$(CCACHE) $(HOST_CROSS_COMPILE)gcc
HOSTCXX?=$(CCACHE) $(HOST_CROSS_COMPILE)clang++
HOST_PKG_CONFIG?=$(HOST_CROSS_COMPILE)pkg-config
PROTOC?=protoc
+GCOV=$(CROSS_COMPILE)gcov
+HOSTGCOV=$(CURDIR)/util/llvm-gcov.sh
C_WARN = -Wstrict-prototypes -Wdeclaration-after-statement -Wno-pointer-sign
COMMON_WARN = -Wall -Wundef -Werror -Werror-implicit-function-declaration \