RFR: 8348028: Unable to run gtests with CDS enabled [v3]

Calvin Cheung ccheung at openjdk.org
Fri Feb 28 00:37:24 UTC 2025


On Thu, 27 Feb 2025 15:58:55 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> This is completely wrong.
>> 
>> The JVM_CFLAGS_FEATURES should be used to add feature-specific flags, not like this. If we really did want to add this to the CFLAGS for all Hotspot files, the correct thing to do would be to add it to JVM_CFLAGS in JvmFlags.gmk.
>> 
>> However, that is not something we want to do. I fully agree with Julian. This is a specific patch needed for one file only, and it should be added just for this particular file. Compare how this is done for e.g. `abstract_vm_version.cpp` in CompileJvm.gmk.
>
> Maybe we can add a new API `const char* Abstract_VM_Version::vm_variant()` that returns the value defined `-DJVM_VARIANT`? Files like os_*cpp and CDS can call this function to get the string such as "server" or "client".

I've pushed another commit based on the above comments.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23758#discussion_r1974546276


More information about the build-dev mailing list