RFR: 8311064: Windows builds fail without precompiled headers after JDK-8310728
Stefan Karlsson
stefank at openjdk.org
Thu Jun 29 07:16:00 UTC 2023
On Wed, 28 Jun 2023 21:13:50 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
> Please review this change to fix Windows build without precompiled headers.
>
> After JDK-8310728:
>> the compiler enforces the C++11 requirement that all functions declared inline must have a definition available in the same translation unit if they're used
>
> When precompiled headers are used, more headers are automatically included, which allowed the build to pass without this change.
>
> This PR adds 2 includes and un-inlines `PlatformMutex` destructor, which was needed by 3 files and not easily exposed.
>
> Windows build passes with this change, both with and without precompiled headers. Full tier1-5 build in progress.
@djelinski @dholmes-ora It's not obvious to me that this was the right fix for ZGC. Could you explain where in zPhysicalMemory.cpp we uses a ZListNode? If it is not and it is instead used in one of the included files the added include line should go there instead.
I also wonder where in ZVirtualMemory_windows.cpp we use zVirtualMemory.inline.hpp? The error message states that we miss `ZMemory::end` etc. So, it seems like the appropriate fix would have been to include zMemory.inline.hpp instead.
-------------
PR Review: https://git.openjdk.org/jdk/pull/14701#pullrequestreview-1504685571
More information about the hotspot-dev
mailing list