From e527ff49a317c8528907283f4aab38895bd6116d Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 17 Jul 2025 20:41:46 -0400 Subject: [PATCH] Report `--stats` final results after build phase --- src/Verilator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Verilator.cpp b/src/Verilator.cpp index 2af5b973a..f712412b8 100644 --- a/src/Verilator.cpp +++ b/src/Verilator.cpp @@ -649,7 +649,6 @@ static void process() { // Final statistics if (v3Global.opt.stats()) V3Stats::statsStage("emit"); - reportStatsIfEnabled(); } static void verilate(const string& argString) { @@ -769,6 +768,7 @@ static void verilate(const string& argString) { V3Os::filesystemFlushBuildDir(v3Global.opt.makeDir()); if (v3Global.opt.hierTop()) V3Os::filesystemFlushBuildDir(v3Global.opt.hierTopDataDir()); + if (v3Global.opt.stats()) V3Stats::statsStage("wrote"); // Final writing shouldn't throw warnings, but... V3Error::abortIfWarnings(); @@ -867,6 +867,7 @@ int main(int argc, char** argv) { execBuildJob(); } + reportStatsIfEnabled(); V3DiagSarif::output(true); // Explicitly release resources