MSVC: conflict preprocessor definition /DAMD64 /DARM64EC on ARM64EC
In !5708 (merged), adding the two definitions AMD64
ARM64EC
to a target ARM64EC
causes conflict.
Given that these two tokens are common words, should this be circumvented? Or just remove the non-underscored definitions?
_M_ARM64EC
is defined on target ARM64EC for MSVC
.
Example
https://github.com/microsoft/vcpkg-tool/blob/main/include/vcpkg/base/cofffilereader.h#L301-L304
https://github.com/microsoft/vcpkg-tool/blob/main/include/vcpkg/base/fwd/system.h#L11
Simplified
enum class MachineType
{
I386,
AMD64,
ARM,
ARM64,
ARM64EC,
};
Related
Modules/Platform/Windows-MSVC.cmake !5708 (diffs)
if((_MSVC_C_ARCHITECTURE_FAMILY STREQUAL "ARM64EC") OR (_MSVC_CXX_ARCHITECTURE_FAMILY STREQUAL "ARM64EC"))
set(_PLATFORM_DEFINES "${_PLATFORM_DEFINES} /D_AMD64_ /DAMD64 /D_ARM64EC_ /DARM64EC /D_ARM64EC_WORKAROUND_")
endif()