RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v13]
Jaikiran Pai
jpai at openjdk.org
Mon Mar 27 11:08:13 UTC 2023
On Fri, 24 Mar 2023 16:52:10 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Platform.java line 49:
>>
>>> 47: throw new ExceptionInInitializerError(e);
>>> 48: }
>>> 49: KNOWN_ENDIANNESS = p;
>>
>> The naming/usage suggests the value is solely for endianness but I think we want target properties to be able to support other attributes of the target too. This means "endianness" in the property name or the property value is something like a comma separate list of attributes, I don't have a strong opinion on this. But maybe your proposal is just to get the target.properties in place and we change it later?
>
> I read this as for endianness only and so the filename might be "target-endianness.properties" or something like that. OTOH, I like keeping it `target.properties` and add `.endianness` as the property name suffix will make it extensible to support other attributes easily.
Given these inputs, I've now updated the PR to use `.endianness` as a suffix to individual keys in the properties file, to allow us reuse this `target.properties` for other details.
Existing tests continue to pass and manual testing shows the correct endianness is detected during cross platform image creation.
I'll trigger a tier testing to make sure nothing breaks.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/11943#discussion_r1149150867
More information about the core-libs-dev
mailing list