Fix --skip-identical broke recent commit.
This commit is contained in:
parent
152505e879
commit
ea3acc2d3a
|
|
@ -785,6 +785,7 @@ void EmitCSyms::emitSymImp() {
|
||||||
|
|
||||||
m_ofpBase->puts("}\n");
|
m_ofpBase->puts("}\n");
|
||||||
closeSplit();
|
closeSplit();
|
||||||
|
VL_DO_CLEAR(delete m_ofp, m_ofp = NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//######################################################################
|
//######################################################################
|
||||||
|
|
|
||||||
|
|
@ -557,11 +557,16 @@ int main(int argc, char** argv, char** env) {
|
||||||
// Can we skip doing everything if times are ok?
|
// Can we skip doing everything if times are ok?
|
||||||
V3File::addSrcDepend(v3Global.opt.bin());
|
V3File::addSrcDepend(v3Global.opt.bin());
|
||||||
if (v3Global.opt.skipIdentical().isTrue()
|
if (v3Global.opt.skipIdentical().isTrue()
|
||||||
&& V3File::checkTimes(v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()
|
&& V3File::checkTimes(v3Global.opt.makeDir() + "/" + v3Global.opt.prefix()
|
||||||
+"__verFiles.dat", argString)) {
|
+ "__verFiles.dat", argString)) {
|
||||||
UINFO(1,"--skip-identical: No change to any source files, exiting\n");
|
UINFO(1,"--skip-identical: No change to any source files, exiting\n");
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
// Undocumented debugging - cannot be a switch as then command line
|
||||||
|
// would mismatch forcing non-identicalness when we set it
|
||||||
|
if (!V3Os::getenvStr("VERILATOR_DEBUG_SKIP_IDENTICAL", "").empty()) {
|
||||||
|
v3fatalSrc("VERILATOR_DEBUG_SKIP_IDENTICAL w/ --skip-identical: Changes found\n");
|
||||||
|
}
|
||||||
|
|
||||||
//--FRONTEND------------------
|
//--FRONTEND------------------
|
||||||
|
|
||||||
|
|
@ -597,13 +602,13 @@ int main(int argc, char** argv, char** env) {
|
||||||
if (v3Global.opt.makeDepend().isTrue()) {
|
if (v3Global.opt.makeDepend().isTrue()) {
|
||||||
V3File::writeDepend(v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()+"__ver.d");
|
V3File::writeDepend(v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()+"__ver.d");
|
||||||
}
|
}
|
||||||
if (v3Global.opt.skipIdentical().isTrue() || v3Global.opt.makeDepend().isTrue()) {
|
|
||||||
V3File::writeTimes(v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()
|
|
||||||
+"__verFiles.dat", argString);
|
|
||||||
}
|
|
||||||
if (v3Global.opt.protectIds()) {
|
if (v3Global.opt.protectIds()) {
|
||||||
VIdProtect::writeMapFile(v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()+"__idmap.xml");
|
VIdProtect::writeMapFile(v3Global.opt.makeDir()+"/"+v3Global.opt.prefix()+"__idmap.xml");
|
||||||
}
|
}
|
||||||
|
if (v3Global.opt.skipIdentical().isTrue() || v3Global.opt.makeDepend().isTrue()) {
|
||||||
|
V3File::writeTimes(v3Global.opt.makeDir() + "/" + v3Global.opt.prefix() + "__verFiles.dat",
|
||||||
|
argString);
|
||||||
|
}
|
||||||
|
|
||||||
// Final writing shouldn't throw warnings, but...
|
// Final writing shouldn't throw warnings, but...
|
||||||
V3Error::abortIfWarnings();
|
V3Error::abortIfWarnings();
|
||||||
|
|
|
||||||
|
|
@ -13,13 +13,16 @@ scenarios(vlt => 1);
|
||||||
{
|
{
|
||||||
compile();
|
compile();
|
||||||
|
|
||||||
|
print "NOTE: use --debugi, as --debug in driver turns off skip-identical\n";
|
||||||
|
|
||||||
my $outfile = "$Self->{obj_dir}/V".$Self->{name}.".cpp";
|
my $outfile = "$Self->{obj_dir}/V".$Self->{name}.".cpp";
|
||||||
my @oldstats = stat($outfile);
|
my @oldstats = stat($outfile);
|
||||||
print "Old mtime=",$oldstats[9],"\n";
|
print "Old mtime=",$oldstats[9],"\n";
|
||||||
$oldstats[9] or error("No output file found: $outfile\n");
|
$oldstats[9] or error("No output file found: $outfile\n");
|
||||||
|
|
||||||
sleep(1); # Or else it might take < 1 second to compile and see no diff.
|
sleep(2); # Or else it might take < 1 second to compile and see no diff.
|
||||||
|
|
||||||
|
$ENV{VERILATOR_DEBUG_SKIP_IDENTICAL} = 1;
|
||||||
compile();
|
compile();
|
||||||
|
|
||||||
my @newstats = stat($outfile);
|
my @newstats = stat($outfile);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue