Is GCC officially supported?
I ran into a compilation error when trying to build Node with -O0:
HeapAllocator::AllocateRaw (both the templated and non-templated versions) are marked as always_inline.
The non-templated version has a switch statement that calls the relevant templated version.
If v8 is compiled with the single_generation flag set to true, then the templated version calls the non-templated version with kOld if called with kYoung. GCC doesn’t like this, it reports that the function couldn’t be inlined.
When you build without the single_generation flag at -O1 or above, GCC seems to elide the recursive call entirely (the flag is read-only constexpr) so it doesn’t hit this issue.
When you build at -O0, that’s not the case, and the inlining fails.
See here for a reduced reproduction: