Fix class extends with VM_PARALLEL_BUILDS (#2775).

This commit is contained in:
Wilson Snyder 2021-02-13 17:29:34 -05:00
parent 2b72218dd8
commit 20b3f0efa0
3 changed files with 10 additions and 0 deletions

View File

@ -9,6 +9,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix $fread extra semicolon inside statements. [Leendert van Doorn]
**** Fix class extends with VM_PARALLEL_BUILDS (#2775). [Iru Cai]
**** Fix examples not flushing vcd (#2787). [Richard E George]

View File

@ -3080,6 +3080,13 @@ void EmitCImp::emitIntTop(AstNodeModule*) {
void EmitCImp::emitInt(AstNodeModule* modp) {
puts("\n//==========\n\n");
if (AstClass* classp = VN_CAST(modp, Class)) {
if (classp->extendsp())
puts("#include \"" + prefixNameProtect(classp->extendsp()->classp()->classOrPackagep())
+ ".h\"\n");
}
emitModCUse(modp, VUseType::INT_INCLUDE);
// Declare foreign instances up front to make C++ happy

View File

@ -11,6 +11,7 @@ if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); di
scenarios(simulator => 1);
compile(
make_flags => 'VM_PARALLEL_BUILDS=1', # bug2775
);
execute(