On Fri Sep 29 11:49:27 2023 +0000, Jacek Caban wrote:
Wine uses configure to ensure that `__<arch>__` macros are present: https://gitlab.winehq.org/wine/wine/-/blob/master/configure.ac?ref_type=head...
Thanks - I just found the same when checking around.
However for the PE/ELF split, we only execute that check for the ELF side host compiler, it seems. When compiling with clang in MSVC mode, we never execute that check. (Perhaps we should?) However, even in MSVC mode, Clang does define `__aarch64__`, in addition to `_M_ARM64`. So perhaps we should do the same for `__arm64ec__` as well? Or perhaps that's already done by the commit by @bylaws - I think that's done based on my reading of that commit, but I haven't tested it out myself.
So I guess that just leaves the case of compiling with actual MSVC (which I believe is kinda relevant now, given the current incomplete arm64ec support in LLVM/Clang). I guess we could/should extend the `WINE_CHECK_DEFINE` handling for the PE compiler as well, and consistently use the GNU style naming? But I guess that requires knowing more about arm64ec in configure, which we don't do right now (but I presume we'll need sooner or later anyway)?