From 9e42c8459eee8dd56ba96a77fa895c70f9e499e0 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Mon, 31 Mar 2025 15:39:39 +0200 Subject: [PATCH] Makefile: only detect ccache command when needed --- GNUmakefile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 4b01063cc..ebcff1e51 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -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. ifeq (, $(CCACHE)) - # Use CCACHE for LLVM if possible - ifneq (, $(shell command -v ccache 2> /dev/null)) - CCACHE := ON - else - CCACHE := OFF - endif + LLVM_OPTION += '-DLLVM_CCACHE_BUILD=$(if $(shell command -v ccache 2> /dev/null),ON,OFF)' +else + LLVM_OPTION += '-DLLVM_CCACHE_BUILD=$(CCACHE)' endif -LLVM_OPTION += '-DLLVM_CCACHE_BUILD=$(CCACHE)' # Allow enabling LLVM assertions ifeq (1, $(ASSERT))