Configuring with ccache present now defaults to using it; see OBJCACHE in the manual.

This commit is contained in:
Wilson Snyder 2020-04-05 16:10:33 -04:00
parent 5932eae32a
commit efaf375887
6 changed files with 20 additions and 9 deletions

View File

@ -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:

View File

@ -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.

View File

@ -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<ccache>.
using the default makefiles), and use I<ccache> (set for you if present at
configure time).
=item --output-split-cfuncs I<statements>
@ -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

View File

@ -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

View File

@ -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@

View File

@ -42,6 +42,7 @@ LEX = @LEX@
LFLAGS = -d
PERL = @PERL@
YACC = @YACC@
OBJCACHE ?= @OBJCACHE@
prefix = @prefix@