Makefile: only detect ccache command when needed

This commit is contained in:
Ayke van Laethem
2025-03-31 15:39:39 +02:00
committed by Ron Evans
parent 627743432a
commit 9e42c8459e
+3 -7
View File
@@ -44,14 +44,10 @@ TINYGO ?= $(call detect,tinygo,tinygo $(CURDIR)/build/tinygo)
# Check for ccache if the user hasn't set it to on or off. # Check for ccache if the user hasn't set it to on or off.
ifeq (, $(CCACHE)) ifeq (, $(CCACHE))
# Use CCACHE for LLVM if possible LLVM_OPTION += '-DLLVM_CCACHE_BUILD=$(if $(shell command -v ccache 2> /dev/null),ON,OFF)'
ifneq (, $(shell command -v ccache 2> /dev/null)) else
CCACHE := ON LLVM_OPTION += '-DLLVM_CCACHE_BUILD=$(CCACHE)'
else
CCACHE := OFF
endif
endif endif
LLVM_OPTION += '-DLLVM_CCACHE_BUILD=$(CCACHE)'
# Allow enabling LLVM assertions # Allow enabling LLVM assertions
ifeq (1, $(ASSERT)) ifeq (1, $(ASSERT))