RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v10]
Jaikiran Pai
jpai at openjdk.org
Thu Mar 23 01:44:29 UTC 2023
On Tue, 21 Mar 2023 18:07:30 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Alan's suggestions - don't parse arch out of osname-arch for determining endianness and reduce the number of supported/known target platforms for cross linking
>
> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java line 548:
>
>> 546: Path retainModulesPath,
>> 547: boolean ignoreSigning,
>> 548: boolean bindService,
>
> formatting nit: align the parameters with the first one.
Fixed
> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java line 822:
>
>> 820: PrintWriter log) throws IOException {
>> 821: if (order != null) {
>> 822: this.targetPlatform = Platform.runtime();
>
> The target platform should always be fetched from `java.base` (as it was implemented in `DefaultImageBuilder`) or use the current runtime if `java.base` is from the module path of the current runtime.
>
> If `--endian <order>` is specified, jlink can check if the target platform's endianness matches the specified value and emit an error if mismatch unless `Platform::getNativeByteOrder` is null.
That's a good catch. I've now fixed it as you suggested.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/11943#discussion_r1145578825
PR Review Comment: https://git.openjdk.org/jdk/pull/11943#discussion_r1145579091
More information about the core-libs-dev
mailing list