Skip to content

Commit 9e42c84

Browse files
aykevldeadprogram
authored andcommitted
Makefile: only detect ccache command when needed
1 parent 6277434 commit 9e42c84

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

GNUmakefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,10 @@ TINYGO ?= $(call detect,tinygo,tinygo $(CURDIR)/build/tinygo)
4444

4545
# Check for ccache if the user hasn't set it to on or off.
4646
ifeq (, $(CCACHE))
47-
# Use CCACHE for LLVM if possible
48-
ifneq (, $(shell command -v ccache 2> /dev/null))
49-
CCACHE := ON
50-
else
51-
CCACHE := OFF
52-
endif
47+
LLVM_OPTION += '-DLLVM_CCACHE_BUILD=$(if $(shell command -v ccache 2> /dev/null),ON,OFF)'
48+
else
49+
LLVM_OPTION += '-DLLVM_CCACHE_BUILD=$(CCACHE)'
5350
endif
54-
LLVM_OPTION += '-DLLVM_CCACHE_BUILD=$(CCACHE)'
5551

5652
# Allow enabling LLVM assertions
5753
ifeq (1, $(ASSERT))

0 commit comments

Comments
 (0)