RFR: 8311064: Windows builds fail without precompiled headers after JDK-8310728

Daniel Jeliński djelinski at openjdk.org
Thu Jun 29 08:44:10 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.

Apologies for integrating this early, I wanted to get the CI off my back as quickly as possible, and the changes seemed innocuous enough.

The compiler/linker output does not make it easy to figure out where the offending ZListNode destructor was called. I would guess that it could be called from the implicit ZMemory destructor, will try to confirm that.

Good point about including zMemory instead of zVirtualMemory, I'll look into that.

On a side note, I assume that the split into `hpp` and `inline.hpp` was done to speed up compilation; has anyone checked recently if the split still makes sense? If not, I could do some experiments here.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14701#issuecomment-1612640759


More information about the hotspot-dev mailing list