Re: [PATCH] Add native windows on arm64 support
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Dave Cramer <davecramer@postgres.rocks>
Cc: Michael Paquier <michael@paquier.xyz>,
Anthony Roberts <anthony.roberts@linaro.org>,
Peter Eisentraut <peter@eisentraut.org>, Daniel Gustafsson
<daniel@yesql.se>, Tom Lane <tgl@sss.pgh.pa.us>,
Mike Holmes <mike.holmes@linaro.org>, Andres Freund <andres@anarazel.de>,
Thomas Munro <thomas.munro@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Lina Iyer <lina.iyer@linaro.org>
Date: 2024-01-29T15:35:51Z
Lists: pgsql-hackers
On 2024-01-26 Fr 09:18, Dave Cramer wrote: > > > On Fri, 26 Jan 2024 at 07:36, Andrew Dunstan <andrew@dunslane.net> wrote: > > > On 2024-01-25 Th 20:32, Michael Paquier wrote: > > On Thu, Jan 25, 2024 at 04:52:30PM -0500, Dave Cramer wrote: > >> On Thu, 25 Jan 2024 at 16:32, Andrew Dunstan > <andrew@dunslane.net> wrote: > >>> On 2024-01-25 Th 16:17, Dave Cramer wrote: > >>> Yeah, I think the default Developer Command Prompt for VS2022 > is set up > >>> for x86 builds. AIUI you should start by executing "vcvarsall > x64_arm64". > >> Yup, now I'm in the same state you are > > Wait a minute here. Based on [1], x64_arm64 means you can use a x64 > > host and you'll be able to produce ARM64 builds, still these > will not > > be able to run on the host where they were built. How much of the > > patch posted upthread is required to produce such builds? Basically > > everything from it, I guess, so as build dependencies can be > > satisfied? > > > > [1]: > https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170 > > > If you look at the table here x86 and x64 are the only supported host > architectures. But that's OK, the x64 binaries will run on arm64 (W11 > ARM64 has x64 emulation builtin). If that didn't work Dave and I > would > not have got as far as we have. But you want the x64_arm64 > argument to > vcvarsall so you will get ARM64 output. > > > I've rebuilt it using x64_arm64 and with the attached (very naive > patch) and I still get an x64 binary :( I am definitely getting ARM64 binaries (e.g. for initdb.exe the Windows on ARM compatibility setting is greyed out) I'll try your patch. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com
Commits
-
MSVC: Support building for AArch64.
- a516b3f00d74 19 (unreleased) landed
-
Remove "#ifdef WIN32" guards from src/port/win32*.c
- 09eb633e1baa 17.0 cited
-
Adjust XML test case to avoid unstable behavior.
- 4ea07e7cf3c6 16.0 landed
-
Enable RandomizedBaseAddress (ASLR) on Windows with MSVC builds
- 36389a060ca6 16.0 landed