[PATCH] D68139: [Support, ARM64] Define getHostCPUFeatures for Windows on ARM64 platform
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 23:00:55 PDT 2019
mstorsjo added inline comments.
================
Comment at: lib/Support/Host.cpp:1515
}
+#elif defined(_WIN32) && defined(__aarch64__)
+bool sys::getHostCPUFeatures(StringMap<bool> &Features) {
----------------
TomTan wrote:
> mstorsjo wrote:
> > This should be `defined(_WIN32) && (defined(__aarch64__) || defined(_M_ARM64))`, otherwise it won't be used by MSVC.
> >
> > Also, those PF_* constants are missing in mingw-w64; I'll have to add them there in order not to break builds with such headers.
> As Win32 API is called here, a single check on `_M_ARM64` would be enough for clang and MSVC, but I am not sure for mingw-w64.
In general terms, the `_M_*` defines aren't predefied by clang in MinGW mode, or GCC. The MinGW headers do define `_M_*` defines though (but exactly which header defines them differs between mingw.org and mingw-w64 headers). It's good practice to always check for both arch defines in sync (except for strictly msvc/clang-cl cases, i.e. `ifdef _MSC_VER`), for consistency.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68139/new/
https://reviews.llvm.org/D68139
More information about the llvm-commits
mailing list