GCC support is largely best-effort. We have one GCC bot that we keep green,
but other build configurations and/or GCC versions tend to have issues
every so often. We'd be happy to accept (reasonably non-intrusive) patches
<https://v8.dev/docs/contribute> to improve GCC support.

For the smoothest building experience, use the bundled Clang. That's
usually a version somewhere between upstream trunk and the latest stable
Clang release; it's updated every few weeks and well-tested on all
platforms.


On Fri, Jun 2, 2023 at 4:27 PM Daryl Haresign <da...@haresign.com> wrote:

> 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:
> https://godbolt.org/z/xa8PGqGah
>
> --
> --
> v8-dev mailing list
> v8-dev@googlegroups.com
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-dev/CAJA9qvuDMEVt%2BJZe7KzTRFvA9N0MYaH3m3D4CsogW4fSaQ9h7w%40mail.gmail.com
> <https://groups.google.com/d/msgid/v8-dev/CAJA9qvuDMEVt%2BJZe7KzTRFvA9N0MYaH3m3D4CsogW4fSaQ9h7w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAKSzg3Ra%2BWR9rEYV%3DAMvU4py4hv95dGRdd0LjDhYDqbdCDx4kg%40mail.gmail.com.

Reply via email to