From a040c3d55d340ae3d2ff303494a7eddd4d8d479c Mon Sep 17 00:00:00 2001 From: Yinan Xu Date: Thu, 21 Sep 2023 12:02:29 +0800 Subject: [PATCH] Avoid include Verilator files in src/difftest --- src/test/csrc/difftest/difftest.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/csrc/difftest/difftest.h b/src/test/csrc/difftest/difftest.h index 34059d420..6ca7ea01c 100644 --- a/src/test/csrc/difftest/difftest.h +++ b/src/test/csrc/difftest/difftest.h @@ -20,7 +20,9 @@ #include #include "common.h" #include "difftrace.h" +#ifdef FUZZING #include "emu.h" +#endif // FUZZING #include "refproxy.h" #include "golden.h" @@ -313,6 +315,7 @@ class Difftest { } inline bool in_disambiguation_state() { static bool was_found = false; +#ifdef FUZZING // Only in fuzzing mode if (proxy->in_disambiguation_state()) { was_found = true; @@ -322,6 +325,7 @@ class Difftest { stats.exit_code = SimExitCode::ambiguous; #endif // FUZZER_LIB } +#endif // FUZZING return was_found; }