From ccc17f0a70918ae0f6e94037101718786702295c Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Wed, 20 Dec 2023 20:02:45 -0500 Subject: build: fix 'make test' target to build with clang - gmake set CC=cc as the default therefore the test/test-debug makefile targets will build using gcc (cc == gcc for debian/ubuntu distros) unless set explicitly to clang due to use of 'CC=$(CC)' in test macro. Note: the CI builds vpp images prior to running 'make test', thus the CI does test vpp built using clang. This basically makes local runs of 'make test' build using clang as well. Type: make Change-Id: I7221098c200be23b53bb616e41a42a6d65a03699 Signed-off-by: Dave Wallace --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ed7d5b2e543..70e7dd3dd70 100644 --- a/Makefile +++ b/Makefile @@ -448,10 +448,16 @@ endef .PHONY: test test: +ifeq ($(CC),cc) + $(eval CC=clang) +endif $(call test,vpp,test) .PHONY: test-debug test-debug: +ifeq ($(CC),cc) + $(eval CC=clang) +endif $(call test,vpp_debug,test) .PHONY: test-cov -- cgit 1.2.3-korg