Skip to content

Commit

Permalink
Fix exporting comments through ccache in a different way:
Browse files Browse the repository at this point in the history
This instructs ccache directly. The former version relied on gcc to interpret the "-C" flag, but clang apparently does not understand it.
  • Loading branch information
BevapDin committed Dec 31, 2019
1 parent 0269822 commit 44c66e8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ DEBUGSYMS = -g
#OTHERS = -O3
#DEFINES = -DNDEBUG

# Tells ccache to keep comments, as they can be meaningful to the compiler (as to suppress warnings).
export CCACHE_COMMENTS=1

# Disable debug. Comment this out to get logging.
#DEFINES = -DENABLE_LOGGING

Expand Down Expand Up @@ -209,7 +212,7 @@ ifdef CLANG
LDFLAGS += -stdlib=libc++
endif
ifdef CCACHE
CXX = CCACHE_CPP2=1 ccache $(CROSS)$(CLANGCMD) -C
CXX = CCACHE_CPP2=1 ccache $(CROSS)$(CLANGCMD)
LD = CCACHE_CPP2=1 ccache $(CROSS)$(CLANGCMD)
else
CXX = $(CROSS)$(CLANGCMD)
Expand All @@ -227,7 +230,7 @@ else
# Appears that the default value of $LD is unsuitable on most systems
OS_LINKER := $(CXX)
ifdef CCACHE
CXX = ccache $(CROSS)$(OS_COMPILER) -C
CXX = ccache $(CROSS)$(OS_COMPILER)
LD = ccache $(CROSS)$(OS_LINKER)
else
CXX = $(CROSS)$(OS_COMPILER)
Expand Down

0 comments on commit 44c66e8

Please sign in to comment.