diff options
author | 2025-02-14 19:27:51 +0100 | |
---|---|---|
committer | 2025-02-15 02:20:04 +0000 | |
commit | 884ab372500c9937d4ae21e0bc77ea51e6144307 (patch) | |
tree | b9d16b0144ab754736b8e6da82ff9822db9d6d9a | |
parent | 86f1cbe5f3caec722ad90ed1d61d3685ff8b78fa (diff) |
build: use clang by default when using Makefile
Change https://gerrit.fd.io/r/c/vpp/+/42189 changed default compiler
from clang to GCC as a side effect when using Makefile.
Restore default behavior.
Type: fix
Fixes: b7a00271990b67458afd2e660f92ebf3ebb6f887
Change-Id: I3478fa7c5e2132486a4c3b9d8363c60ed81b0d43
Signed-off-by: Benoît Ganne <bganne@cisco.com>
-rw-r--r-- | Makefile | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -23,6 +23,11 @@ MACHINE=$(shell uname -m) SUDO?=sudo -E DPDK_CONFIG?=no-pci +# we prefer clang by default +ifeq ($(CC),cc) + CC=clang +endif + ifeq ($(strip $(SHELL)),) $(error "bash not found, VPP requires bash to build") endif @@ -541,16 +546,10 @@ 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 |