Skip to content

Commit

Permalink
First working version of the direct mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jrosdahl committed Jan 5, 2010
1 parent 26d779b commit e53af1a
Show file tree
Hide file tree
Showing 21 changed files with 2,433 additions and 227 deletions.
7 changes: 4 additions & 3 deletions Makefile.in
Expand Up @@ -13,11 +13,12 @@ CFLAGS=$(CPPFLAGS) @CFLAGS@
LDFLAGS=@LDFLAGS@
EXEEXT=@EXEEXT@

LIBS= @LIBS@
libs = @LIBS@ -lm

sources = \
ccache.c mdfour.c hash.c execute.c util.c args.c stats.c \
cleanup.c snprintf.c unify.c
cleanup.c snprintf.c unify.c manifest.c hashtable.c hashtable_itr.c \
murmurhashneutral2.c hashutil.c

objs = $(sources:.c=.o)

Expand All @@ -26,7 +27,7 @@ all: ccache$(EXEEXT)
docs: ccache.1 web/ccache-man.html

ccache$(EXEEXT): $(objs)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) $(LIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) $(libs)

ccache.1: ccache.yo
-yodl2man -o ccache.1 ccache.yo
Expand Down
7 changes: 7 additions & 0 deletions NEWS
Expand Up @@ -3,6 +3,13 @@ Changes since ccache 2.4

New features and improvements:

- Implemented a mode called "direct mode" where ccache computes a hash of the
source code and compiler arguments without running the preprocessor. By not
running the preprocessor, CPU usage is reduced; the runtime is about
0.2-1.0 times that of ccache running in traditional mode. The relative
speedup will be higher when I/O is fast (e.g., when files are in the disk
cache). The direct mode can be disabled by setting CCACHE_NODIRECT.

- Object files are now by default stored compressed in the cache. The runtime
cost is negligible, and more files will fit in the ccache directory and in
the disk cache. CCACHE_NOCOMPRESS can be set to disable object file
Expand Down

0 comments on commit e53af1a

Please sign in to comment.