RFR: 8357079: Fix Windows AArch64 DevKit Creation

Magnus Ihse Bursie ihse at openjdk.org
Sat Jun 14 12:02:31 UTC 2025


On Fri, 13 Jun 2025 19:27:20 GMT, Luigi Montoya <duke at openjdk.org> wrote:

>> make/devkit/createWindowsDevkit.sh line 163:
>> 
>>> 161: else
>>> 162:     cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/arm64" $DEVKIT_ROOT/VC/bin/
>>> 163: fi
>> 
>> It seems to make sense to have a single devkit since there seem to be a lot of overlap and not much additional code added to a cross-compiling devkit to also have native binaries.
>> 
>> In fact, I could that not just be done as easily with something like:
>> 
>> 
>> Suggestion:
>> 
>> if [ -d "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostarm64/arm64" ]; then
>>     cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostarm64/arm64" $DEVKIT_ROOT/VC/bin/
>> fi
>> if [ -d "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/arm64" ]; then
>>     cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/arm64" $DEVKIT_ROOT/VC/bin/
>> fi
>> 
>> 
>> Then of course we need to pick up the right set of compilers from the devkit, but I guess that would sort itself out if we know the build platform and are given the target platform as configure argument..?
>
> I was thinking we could create the devkit based on the platform where the script is being run. For example, running `createWindowsDevkit.sh` on:
> 
> - Windows x64 would produce:
>   - Native x86 libraries
>   - Native x64 libraries
>   - Cross-compiled aarch64 libraries
> - Windows aarch64 would produce:
>   - Native x86 libraries
>   - Native x64 libraries
>   - Native aarch64 libraries
> 
> From my analysis of your code suggestion, it looks like it might override the native aarch64 libraries and always set the cross-compiled ones. What do you think?

I agree with your general premise, that the devkit should be created for the platform the devkit script is run on.

When you say that you should produce "native" x64 libraries on aarch64, do you mean that they should be run using x64 emulation? Otherwise you can't really have native x64 on aarch64... And even if that works, would it not be better to have pure native aarch64 cross-compiling to x64 (given that Microsoft in fact ships such compilers).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25259#discussion_r2146881036


More information about the build-dev mailing list