Add OBJCACHE envvar support to examples and generated Makefiles.

This commit is contained in:
Wilson Snyder 2018-06-15 07:13:18 -04:00
parent 6e7f28785e
commit 65bb93a6c5
6 changed files with 13 additions and 5 deletions

View File

@ -4,6 +4,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
* Verilator 3.925 devel * Verilator 3.925 devel
**** Add OBJCACHE envvar support to examples and generated Makefiles.
* Verilator 3.924 2018-06-12 * Verilator 3.924 2018-06-12

View File

@ -1707,8 +1707,8 @@ needed at runtime.
Optionally specifies a caching or distribution program to place in front of Optionally specifies a caching or distribution program to place in front of
all runs of the C++ Compiler. For example, "objcache --read --write", or all runs of the C++ Compiler. For example, "objcache --read --write", or
"ccache". If using distcc, it would generally be run under either objcache "ccache". If using distcc or icecc/icecream, they would generally be run
or ccache; see the documentation for those programs. under either objcache or ccache; see the documentation for those programs.
=item SYSTEMC =item SYSTEMC

View File

@ -17,6 +17,9 @@ default: Vtop
# Include the rules made by Verilator # Include the rules made by Verilator
include Vtop.mk include Vtop.mk
# Use OBJCACHE (ccache) if using gmake and its installed
COMPILE.cc = $(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
####################################################################### #######################################################################
# Compile flags # Compile flags

View File

@ -17,6 +17,9 @@ default: Vtop
# Include the rules made by Verilator # Include the rules made by Verilator
include Vtop.mk include Vtop.mk
# Use OBJCACHE (ccache) if using gmake and its installed
COMPILE.cc = $(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
####################################################################### #######################################################################
# Compile flags # Compile flags

View File

@ -206,7 +206,7 @@ public:
string cppfile = *it; string cppfile = *it;
string basename = V3Os::filenameNonExt(cppfile); string basename = V3Os::filenameNonExt(cppfile);
of.puts(basename+".o: "+cppfile+"\n"); of.puts(basename+".o: "+cppfile+"\n");
of.puts("\t$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPT_FAST) -c -o $@ $<\n"); of.puts("\t$(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPT_FAST) -c -o $@ $<\n");
} }
of.puts("\n### Link rules... (from --exe)\n"); of.puts("\n### Link rules... (from --exe)\n");

View File

@ -1734,8 +1734,8 @@ resource required by the test is not available, such as SystemC), or are
unsupported (buggy or require a feature change before will pass.) unsupported (buggy or require a feature change before will pass.)
There are hundreds of tests, and for faster completion you may want to run There are hundreds of tests, and for faster completion you may want to run
the regression tests with CCACHE enabled and in parallel on a machine with the regression tests with OBJCACHE enabled and in parallel on a machine
many cores. See the -j option. with many cores. See the -j option and OBJCACHE environment variable.
=head1 TEST CONFIGURATION =head1 TEST CONFIGURATION