Skip to content

Commit 90157dd

Browse files
philippremysimogasp
authored andcommitted
[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 <philipp.remy@law-school.de>
1 parent 5bf1692 commit 90157dd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/cctag/utils/pcg_uint128.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@
7272
#elif __powerpc__ || __POWERPC__ || __ppc__ || __PPC__ \
7373
|| __m68k__ || __mc68000__
7474
#define PCG_LITTLE_ENDIAN 0
75+
#elif _M_ARM || _M_ARM64 || _M_ARM64EC // MSVC ARM Support
76+
#define PCG_LITTLE_ENDIAN 1
7577
#else
76-
#error Unable to determine target endianness
78+
#error Unable to determine target endianness, please file a bug report
7779
#endif
7880
#endif
7981

0 commit comments

Comments
 (0)