From 6e7f28785e36bc3322a7c300e3d2de669e20ad82 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 15 Jun 2018 06:54:03 -0400 Subject: [PATCH 1/2] Internals: Cleanup graph includes. No functional change. --- src/V3Graph.h | 1 - src/V3GraphDfa.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/V3Graph.h b/src/V3Graph.h index aeafc0cd5..2664f3417 100644 --- a/src/V3Graph.h +++ b/src/V3Graph.h @@ -24,7 +24,6 @@ #include "verilatedos.h" #include "V3Error.h" #include "V3List.h" -#include "V3Ast.h" #include #include diff --git a/src/V3GraphDfa.h b/src/V3GraphDfa.h index df870afea..32fc9571b 100644 --- a/src/V3GraphDfa.h +++ b/src/V3GraphDfa.h @@ -24,6 +24,7 @@ #include "verilatedos.h" #include +#include "V3Ast.h" // for VNUser #include "V3Global.h" #include "V3Graph.h" From 65bb93a6c5c6f85cc03de5ea3cac3cd07fd9297f Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Fri, 15 Jun 2018 07:13:18 -0400 Subject: [PATCH 2/2] Add OBJCACHE envvar support to examples and generated Makefiles. --- Changes | 2 ++ bin/verilator | 4 ++-- examples/tracing_c/Makefile_obj | 3 +++ examples/tracing_sc/Makefile_obj | 3 +++ src/V3EmitMk.cpp | 2 +- test_regress/driver.pl | 4 ++-- 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Changes b/Changes index a7fc21208..fa28aa0c2 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,8 @@ The contributors that suggested a given feature are shown in []. Thanks! * Verilator 3.925 devel +**** Add OBJCACHE envvar support to examples and generated Makefiles. + * Verilator 3.924 2018-06-12 diff --git a/bin/verilator b/bin/verilator index 0f75a5f83..370122c80 100755 --- a/bin/verilator +++ b/bin/verilator @@ -1707,8 +1707,8 @@ needed at runtime. 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, it would generally be run under either objcache -or ccache; see the documentation for those programs. +"ccache". If using distcc or icecc/icecream, they would generally be run +under either objcache or ccache; see the documentation for those programs. =item SYSTEMC diff --git a/examples/tracing_c/Makefile_obj b/examples/tracing_c/Makefile_obj index 106bd680f..5f71b873a 100644 --- a/examples/tracing_c/Makefile_obj +++ b/examples/tracing_c/Makefile_obj @@ -17,6 +17,9 @@ default: Vtop # Include the rules made by Verilator include Vtop.mk +# Use OBJCACHE (ccache) if using gmake and its installed +COMPILE.cc = $(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c + ####################################################################### # Compile flags diff --git a/examples/tracing_sc/Makefile_obj b/examples/tracing_sc/Makefile_obj index 48f4c7178..6f7868f52 100644 --- a/examples/tracing_sc/Makefile_obj +++ b/examples/tracing_sc/Makefile_obj @@ -17,6 +17,9 @@ default: Vtop # Include the rules made by Verilator include Vtop.mk +# Use OBJCACHE (ccache) if using gmake and its installed +COMPILE.cc = $(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c + ####################################################################### # Compile flags diff --git a/src/V3EmitMk.cpp b/src/V3EmitMk.cpp index 4dd964304..7c6fe8111 100644 --- a/src/V3EmitMk.cpp +++ b/src/V3EmitMk.cpp @@ -206,7 +206,7 @@ public: string cppfile = *it; string basename = V3Os::filenameNonExt(cppfile); 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"); diff --git a/test_regress/driver.pl b/test_regress/driver.pl index c96d8ad86..b9cabbf4e 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -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.) 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 -many cores. See the -j option. +the regression tests with OBJCACHE enabled and in parallel on a machine +with many cores. See the -j option and OBJCACHE environment variable. =head1 TEST CONFIGURATION