Skip to content

Commit

Permalink
Add a Makefile setting for buildign with ccache.
Browse files Browse the repository at this point in the history
This greatly speeds up the build when frequently rebuilding from scratch
(e.g. in case of a buildbot). Some hacks are added for using ccache in
combination with Clang.
  • Loading branch information
Tim Besard committed Oct 3, 2014
1 parent 6117328 commit ed643c6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,19 @@ DEBUGFLAGS = -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all
SHIPFLAGS = -O3 -g -falign-functions
endif

ifeq ($(USECCACHE), 1)
CC := ccache $(CC)
CXX := ccache $(CXX)
ifeq ($(USECLANG),1)
# ccache and Clang don't do well together
# http:https://petereisentraut.blogspot.be/2011/05/ccache-and-clang.html
CC += -Qunused-arguments -fcolor-diagnostics
CXX += -Qunused-arguments -fcolor-diagnostics
# http:https://petereisentraut.blogspot.be/2011/09/ccache-and-clang-part-2.html
export CCACHE_CPP2 := yes
endif
endif

ifeq ($(LLVM_VER),svn)
JCXXFLAGS += -std=c++11
endif
Expand Down

0 comments on commit ed643c6

Please sign in to comment.