RFR: JDK-8302989: Add missing INCLUDE_CDS checks [v3]

Matthias Baesken mbaesken at openjdk.org
Fri Mar 3 08:55:12 UTC 2023


On Fri, 3 Mar 2023 00:58:58 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   adjust some cds related vars
>
> src/hotspot/share/runtime/arguments.cpp line 2675:
> 
>> 2673:       xshare_auto_cmd_line = true;
>> 2674:     // -Xshare:off
>> 2675:     } else if (match_option(option, "-Xshare:off")) {
> 
> These flags should all immediately be rejected if used in a non-CDS build. Yes this is pre-existing but it now looks totally broken with the new changes. There should be something like:
> 
> #ifndef INCLUDE_CDS
> } else if (match_option(option, "-Xshare")) {  // or whatever we need to match the prefix only
>   warning("Option %s is not supported in this VM", option);
> #else 
> // process flags as usual
> #endif

Hi David,  I adjusted the coding following your request (however we need to use `#if`  not  `#ifndef`   here).

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

PR: https://git.openjdk.org/jdk/pull/12691


More information about the hotspot-dev mailing list