On Mon, 31 Mar 2025 14:44:23 GMT, Saint Wesonga <d...@openjdk.org> wrote:

> Upon closer inspection, the --build option results in a native build (per the 
> build system) but the ARM64 C++ compiler binary (cl.exe) is actually an x64 
> binary, so the compiler is running in emulated mode despite the build system 
> thinking that a native build is happening. I'm investigating this in 
> https://bugs.openjdk.org/browse/JDK-8353066

The logic for finding the vcvars.cmd file to setup the Visual Studio 
environment is hardcoded for x64. You will need to make that logic more generic.

> I propose changing the scope of this PR to documenting cross compilation for 
> windows/aarch64 on windows/x64 and fixing the native build in 
> https://bugs.openjdk.org/browse/JDK-8353066

I propose expanding on the doc in this PR just a tad and explaining that to 
perform a _native_ windows-aarch64 build with Cygwin, you need to set 
`--build=aarch64-pc-cygwin` as a workaround and to cross compile it, set 
`--openjdk-target=aarch64-unknown-cygwin`. But it depends on how quickly you 
expect to fix JDK-8353066. At the very least, the documentation needs to be 
clear on the difference between a native and a cross compile setup.

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

PR Comment: https://git.openjdk.org/jdk/pull/24267#issuecomment-2766930392

Reply via email to