RFR: 8311064: Windows builds fail without precompiled headers after JDK-8310728
David Holmes
dholmes at openjdk.org
Thu Jun 29 08:01:05 UTC 2023
On Thu, 29 Jun 2023 04:42:40 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.
>
> Mostly because the same destructor is not inline in os_posix.cpp.
> I could include "runtime/os.inline.hpp" in xPhysicalMemory.cpp, xVirtualMemory.cpp and zVirtualMemory.cpp, but that would add weight to non-Windows builds for no good reason.
@djelinski hotspot changes require two reviews before integration.
@stefank I took it on faith that the ZGC changes were appropriate, or that a ZGC reviewer would report otherwise. If a hpp file is trying to use an inline function that is a problem in itself!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14701#issuecomment-1612585143
More information about the hotspot-dev
mailing list