Visitar URL original
[C++] Bump bundled xsimd to 14.3.0 to fix Windows aarch64 build with mingw-w64 toolchains · Issue #52022 · apache/arrow · GitHub
Skip to content

[C++] Bump bundled xsimd to 14.3.0 to fix Windows aarch64 build with mingw-w64 toolchains #52022

Description

@jeroen

Describe the enhancement requested

The bundled xsimd 14.2.0 (ARROW_XSIMD_BUILD_VERSION in cpp/thirdparty/versions.txt) includes the MSVC-only <arm64_neon.h> header whenever _WIN32 and NEON64 are defined:

// xsimd 14.2.0, include/xsimd/types/xsimd_neon_register.hpp
#if XSIMD_WITH_NEON
#if defined(_WIN32) && XSIMD_WITH_NEON64
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#endif

_WIN32 is also defined by mingw-w64 toolchains (e.g. the clangarm64 environment in MSYS2, and llvm-mingw for Windows on ARM). Those toolchains do not ship <arm64_neon.h>, so building Arrow C++ for Windows aarch64 with a mingw-w64 compiler fails with a missing header error.

xsimd 14.3.0 narrows the condition to MSVC proper (defined(_MSC_VER) && !defined(__clang__)), so mingw-w64 and clang builds use <arm_neon.h> as expected:

// xsimd 14.3.0
#if defined(_MSC_VER) && !defined(__clang__) && XSIMD_WITH_NEON64
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif

We hit this when updating the Arrow build for the R Windows toolchain (https://github.com/r-windows/ucrt-libs), where we currently work around it by patching versions.txt to xsimd 14.3.0 in the PKGBUILD's prepare() step.

Proposal: bump the bundled xsimd to 14.3.0 (version + SHA256 in versions.txt).

Component(s)

C++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions