On Fri, 13 Jun 2025 13:58:48 GMT, Magnus Ihse Bursie <i...@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..? 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? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25259#discussion_r2145929505