aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2023-12-20 20:02:45 -0500
committerDamjan Marion <dmarion@0xa5.net>2023-12-22 14:32:38 +0000
commitccc17f0a70918ae0f6e94037101718786702295c (patch)
tree733c4f128d9b4b39a6b75a2d5d7dd5c4baf5180d
parent95f07a16ae8098e1775fa83e4005b78d06991cee (diff)
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 <dwallacelf@gmail.com>
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
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