On Wed, 17 May 2023 08:48:53 GMT, Aleksey Shipilev <[email protected]> wrote:

>> PPC64le needs to get recognized as PPC64. Otherwise, jlink doesn't recognize 
>> the platform and throws a PluginException: ModuleTarget is malformed: No 
>> enum constant jdk.internal.util.Architecture.PPC64LE.
>
> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/Platform.java line 55:
> 
>> 53:         // Alias architecture "amd64" to "X64" and "ppc64le" to "ppc64"
>> 54:         archName = archName.replace("amd64", "X64")
>> 55:                            .replace("ppc64le", "ppc64");
> 
> I'd prefer it to be:
> 
> Suggestion:
> 
>         // Alias architecture names, if needed
>         archName = archName.replace("amd64", "X64");
>         archName = archName.replace("ppc64le", "PPC64");
> 
> 
> So that other arches would add here more naturally.
> 
> (Also convert to upper-case right away, to make the subsequent 
> `archName.toUpperCase` no-op).

Makes sense. Thanks for the review!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14027#discussion_r1196188653

Reply via email to