On Sat, 14 Jun 2025 11:59:32 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

>> 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).

When you download the Visual Studio Build Tools on an ARM64 machine, it 
downloads the native binaries for the `x64` architecture under `Hostx64` and 
the native binaries for `arm64` under `Hostarm64`. This devkit script does not 
generate any binaries; it simply copies the Build Tools from Visual Studio.

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

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

Reply via email to