Re: [PATCH] Add native windows on arm64 support

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Niyas Sait <niyas(dot)sait(at)linaro(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Ian Lawrence Barwick <barwick(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add native windows on arm64 support
Date: 2022-12-05 05:12:41
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Dec 02, 2022 at 11:09:15AM +0000, Niyas Sait wrote:
> I've attached a new revision of the patch (v5) and includes following
> changes,
> 1. Add support for meson build system
> 2. Extend MSVC scripts to handle ARM64 platform.
> 3. Add arm64 definition of spin_delay function.
> 4. Exclude arm_acle.h import with MSVC compiler.

Hmm. There are still a few things that need some attention here:
- USE_SSE42_CRC32C_WITH_RUNTIME_CHECK should not be set for aarch64.
- This is missing updates for ICU. Looking at the upstream code,
Build.Windows.ProjectConfiguration.props uses libARM64 and binARM64
for the output library and binary paths.
- This is missing updates for krb5. For this case, I am seeing no
traces of packages for aarch64, so I guess that we could just fail
hard until someone cares enough to ping us about what to do here.
- There were zero changes in the docs, but we need to update at least
the section about architectures supported for the 64-bit builds.
- Last comes OpenSSL, that supports amd64_arm64 as build target (see, and the library names are libssl.lib and
libcrypto.lib. Looking at, there are
experimental builds for arm64 with OpenSSL 3.0. Niyas or somebody
else, could you look at the contents of lib/VC/ and see what we could
rely on for the debug builds after installing this MSI? We should
rely on something like lib/VC/sslcrypto64MD.lib or
lib/VC/sslcrypto32MD.lib, but for arm64.

With meson gaining in maturity, perhaps that's not the most urgent
thing as we will likely remove src/tools/msvc/ soon but I'd rather do
that right anyway as much as I can to avoid an incorrect state in the
tree at any time in its history.

+ USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK => $self->{platform} eq "ARM64" ? : 1 : undef,
Did you actually test this patch? This won't work at all with perl,
per se the double colon after the question mark.

For now, please find attached an updated patch with all the fixes I
could come up with.

Attachment Content-Type Size
v6-0001-Enable-postgres-native-build-for-windows-arm64-pl.patch text/x-diff 9.6 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2022-12-05 06:08:09 Re: generic plans and "initial" pruning
Previous Message David G. Johnston 2022-12-05 04:53:11 Re: Optimize common expressions in projection evaluation