diff --git a/libcudacxx/include/cuda/std/__cccl/architecture.h b/libcudacxx/include/cuda/std/__cccl/architecture.h index 1c7f25d6b0e..c50fe4fea1c 100644 --- a/libcudacxx/include/cuda/std/__cccl/architecture.h +++ b/libcudacxx/include/cuda/std/__cccl/architecture.h @@ -26,7 +26,9 @@ #endif // X86 64-bit -#if defined(_M_X64) || defined(__amd64__) || defined(__x86_64__) + +// _M_X64 is defined even if we are compiling in Arm64 emulation mode +#if (defined(_M_X64) && !defined(_M_ARM64EC)) || defined(__amd64__) || defined(__x86_64__) # define _CCCL_ARCH_X86_64_() 1 #else # define _CCCL_ARCH_X86_64_() 0