[libcxx-commits] [libcxx] [libcxx] [test] Detect mingw-w64 headers compatible with C++ module builds (PR #92893)
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Tue May 21 05:03:42 PDT 2024
mstorsjo wrote:
> This looks correct, but if we need to check `__mingw_static_ovr` anyway, I wonder if `__MINGW64_VERSION_MAJOR` checks could be just skipped.
Ideally, we shouldn't need to check for things like `__mingw_static_ovr` (we could happen to reintroduce a macro with that name at any point, breaking it). But if we only check this within a finite range, up until `__MINGW64_VERSION_MAJOR` is bumped to 13 (which I would presume happens pretty soon after v12 gets tagged), we should know for certain that this works as intended detection for this version.
And later in the future, e.g. when most msys2, llvm-mingw deployments, and versions used in the libcxx CI run with `__MINGW64_VERSION_MAJOR >= 13`, we could consider simplifying this check into just looking for `__MINGW64_VERSION_MAJOR >= 13`, and disregard the (in comparison) short period of time when there were toolchains with `__MINGW64_VERSION_MAJOR == 12` that worked with the module build.
https://github.com/llvm/llvm-project/pull/92893
More information about the libcxx-commits
mailing list