diff --git a/.travis.yml b/.travis.yml index e99bbd848..e9cbc4c3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,6 @@ env: - VERILATOR_NUM_JOBS=$(echo `nproc` + 1 | bc) - VERILATOR_CONFIG_FLAGS="--enable-maintainer-mode --enable-longtests" - VERILATOR_AUTHOR_SITE=1 - - OBJCACHE=ccache cache: directories: diff --git a/Changes b/Changes index 9ab756798..14321ad0e 100644 --- a/Changes +++ b/Changes @@ -7,6 +7,8 @@ The contributors that suggested a given feature are shown in []. Thanks! ** Add simplistic class support with many restrictions, see manual, #377. +** Configuring with ccache present now defaults to using it; see OBJCACHE. + **** Support $ferror, and $fflush without arguments, #1638. diff --git a/bin/verilator b/bin/verilator index e1545e98b..2c544eeb0 100755 --- a/bin/verilator +++ b/bin/verilator @@ -1080,7 +1080,8 @@ design --output-split 20000 resulted in splitting into approximately one-minute-compile chunks. Typically when using this, make with VM_PARALLEL_BUILDS=1 (set for you if -using the default makefiles), and use I. +using the default makefiles), and use I (set for you if present at +configure time). =item --output-split-cfuncs I @@ -2125,9 +2126,10 @@ needed at simulation runtime. =item OBJCACHE Optionally specifies a caching or distribution program to place in front of -all runs of the C++ Compiler. For example, "objcache --read --write", or -"ccache". If using distcc or icecc/icecream, they would generally be run -under either objcache or ccache; see the documentation for those programs. +all runs of the C++ compiler. For example, "ccache". If using distcc or +icecc/icecream, they would generally be run under cache; see the +documentation for those programs. If OBJCACHE is not set, and at configure +time ccache was present, ccache will be used as a default. =item SYSTEMC @@ -5136,9 +5138,9 @@ now relatively old GCC 3.0 to 3.3 being horrible. Compile in parallel on many machines and use caching; see the web for the ccache, distcc and icecream packages. ccache will skip GCC runs between -identical source builds, even across different users. You can use the -OBJCACHE environment variable to use these CC wrappers. Also see the ---output-split option. +identical source builds, even across different users. If ccache was +installed when Verilator was built it is used, or see OBJCACHE environment +variable to override this. Also see the --output-split option. To reduce the compile time of classes that use a Verilated module (e.g. a top CPP file) you may wish to add /*verilator no_inline_module*/ to your diff --git a/configure.ac b/configure.ac index 0db24735d..fd93c6580 100644 --- a/configure.ac +++ b/configure.ac @@ -159,6 +159,12 @@ if test "x$YACC" = "x" ; then AC_MSG_ERROR([Cannot find "bison" in your PATH, please install it]) fi +AC_CHECK_PROG(OBJCACHE,ccache,ccache) +if test "x$OBJCACHE" != "x" ; then + objcache_version=$($OBJCACHE --version | head -1) + AC_MSG_RESULT([objcache is $OBJCACHE --version = $objcache_version]) +fi + # Checks for libraries. # Checks for typedefs, structures diff --git a/include/verilated.mk.in b/include/verilated.mk.in index 47e3f61a9..f1fee71dc 100644 --- a/include/verilated.mk.in +++ b/include/verilated.mk.in @@ -12,8 +12,9 @@ PERL = @PERL@ CXX = @CXX@ LINK = @CXX@ -AR = ar +AR = ar RANLIB = ranlib +OBJCACHE ?= @OBJCACHE@ CFG_WITH_CCWARN = @CFG_WITH_CCWARN@ CFG_WITH_LONGTESTS = @CFG_WITH_LONGTESTS@ diff --git a/src/Makefile_obj.in b/src/Makefile_obj.in index 4b0d83dd2..f35bb2103 100644 --- a/src/Makefile_obj.in +++ b/src/Makefile_obj.in @@ -42,6 +42,7 @@ LEX = @LEX@ LFLAGS = -d PERL = @PERL@ YACC = @YACC@ +OBJCACHE ?= @OBJCACHE@ prefix = @prefix@