Fix link error on gcc

There seems to be a bug in gcc which causes link errors after
this CL: https://crrev.com/c/3714238

Issue seems to happen when using default template argument
of function type. A related bug report on bugzilla:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105848

A workaround is to explicitly instantiate the template
for type <bool>.

Bug: v8:12991
Change-Id: I74db7d42d7b41e8af5d721b8c10130a7a0f2a999
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3718379
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81304}
This commit is contained in:
Milad Fa 2022-06-22 09:03:48 -04:00 committed by V8 LUCI CQ
parent b4bb6cbce4
commit c0837f2c6f

View File

@ -334,6 +334,10 @@ CommonOperatorBuilder* BranchElimination::common() const {
return jsgraph()->common();
}
// Workaround a gcc bug causing link errors.
// Related issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105848
template bool DefaultConstruct<bool>(Zone* zone);
} // namespace compiler
} // namespace internal
} // namespace v8