From fe97868fb92890fe723082adbe7b09419a9a9bd9 Mon Sep 17 00:00:00 2001 From: Philipp Remy Date: Wed, 21 Jan 2026 13:52:39 +0100 Subject: [PATCH] [FIX] Handle endianness check for MSVC ARM[64] This patch adds support for detecting the endianness for pcg_uint128.hpp when compiling with MSVC and targeting ARM architectures. Windows on ARM requires code to be compiled in little-endian (see https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/build/arm64-windows-abi-conventions.md#endianness). This enables compiling CCTag on Windows on ARM. Signed-off-by: Philipp Remy --- src/cctag/utils/pcg_uint128.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cctag/utils/pcg_uint128.hpp b/src/cctag/utils/pcg_uint128.hpp index 55726657..6511417c 100644 --- a/src/cctag/utils/pcg_uint128.hpp +++ b/src/cctag/utils/pcg_uint128.hpp @@ -72,8 +72,10 @@ #elif __powerpc__ || __POWERPC__ || __ppc__ || __PPC__ \ || __m68k__ || __mc68000__ #define PCG_LITTLE_ENDIAN 0 + #elif _M_ARM || _M_ARM64 || _M_ARM64EC // MSVC ARM Support + #define PCG_LITTLE_ENDIAN 1 #else - #error Unable to determine target endianness + #error Unable to determine target endianness, please file a bug report #endif #endif