On Thu, 19 Jun 2025 23:49:24 GMT, Luigi Montoya <d...@openjdk.org> wrote:

>> So if we run the devkit script on an aarch64 machine, we can create a devkit 
>> that will work on both x64 and aarch64? But if we run it on x64, the devkit 
>> that we create will only work on x64? Have I got this right?
>> 
>> If so, I think the script should support this, and make it clear what it 
>> does. That is, if you run it on aarch64, you get a multi-platform devkit, 
>> but on x64 you get a x64-only devkit. I think the devkit script should 
>> mention this, ideally in an `echo` statement, but a comment in the source 
>> code is acceptable. Like:
>> `You are generating a devkit for x64 only. To include aarch64 as well, run 
>> the script on windows/aarch64` and `Generating devkit for x64 and aarch64`, 
>> respectively. Or something like that.
>
> I was planning adding something like this:
> 
> # Detect host architecture to determine devkit platform support
> # Note: The devkit always includes x86, x64, and aarch64 libraries and tools
> # The difference is in toolchain capabilities:
> # - On x64|AMD64 hosts: aarch64 tools are cross-compilation tools 
> (Hostx64/arm64)
> # - On aarch64|ARMv8 hosts: aarch64 tools are native tools (Hostarm64/arm64)
> HOST_ARCH=`echo $PROCESSOR_IDENTIFIER`
> case $HOST_ARCH in
>     AMD64)
>         echo "Running on x64 host - generating devkit with native x86/x64 
> tools and cross-compiled aarch64 tools."
>         echo "For native aarch64 compilation tools, run this script on a 
> Windows/aarch64 machine."
>         SUPPORTED_PLATFORMS="x86, x64 (native) and aarch64 (cross-compiled)"
>         ;;
>     ARMv8)
>         echo "Running on aarch64 host - generating devkit with native tools 
> for all platforms (x86, x64, aarch64)."
>         SUPPORTED_PLATFORMS="x86, x64, and aarch64 (all native)"
>         ;;
>     *)
>         echo "Unknown host architecture: $HOST_ARCH"
>         echo "Proceeding with devkit generation - toolchain capabilities may 
> vary."
>         SUPPORTED_PLATFORMS="x86, x64, and aarch64"
>         ;;
> esac

That looks good, I think!

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

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

Reply via email to