On Thu, 15 May 2025 22:16:34 GMT, Luigi Montoya <d...@openjdk.org> wrote:

> Fix path for Visual Studio arm64 binaries in createWindowsDevkit.sh
> 
> The DevKit currently created on a Windows AArch64 machine uses the x64 
> compiler binaries (e.g. cl.exe). This can be inspected by running "dumpbin 
> /headers /out:cl.txt cl.exe" on the compiler in the generated DevKit and 
> inspecting the machine architecture line. It should instead use the native 
> Windows AArch64 compiler binaries

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

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

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

Reply via email to