If I'm reading the following code correctly:
OptionValues graalOptions = HotSpotGraalOptionValues.HOTSPOT_OPTIONS;
// Setting -Dgraal.TieredAOT overrides --compile-for-tiered
if (!TieredAOT.hasBeenSet(graalOptions)) {
graalOptions = new OptionValues(graalOptions, TieredAOT, options.tiered);
}
graalOptions = new OptionValues(HotSpotGraalOptionValues.HOTSPOT_OPTIONS, GeneratePIC, true, ImmutableCode, true);
Then the last setting of graalOptions cancels any previous change, because we pass in HOTSPOT_OPTIONS instead of graalOptions.
OptionValues graalOptions = HotSpotGraalOptionValues.HOTSPOT_OPTIONS;
// Setting -Dgraal.TieredAOT overrides --compile-for-tiered
if (!TieredAOT.hasBeenSet(graalOptions)) {
graalOptions = new OptionValues(graalOptions, TieredAOT, options.tiered);
}
graalOptions = new OptionValues(HotSpotGraalOptionValues.HOTSPOT_OPTIONS, GeneratePIC, true, ImmutableCode, true);
Then the last setting of graalOptions cancels any previous change, because we pass in HOTSPOT_OPTIONS instead of graalOptions.