[libcxx-commits] [PATCH] D98035: [libcxx] Don't add -Wall when building in MSVC mode

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 5 06:58:37 PST 2021

mstorsjo added a comment.

In D98035#2606577 <https://reviews.llvm.org/D98035#2606577>, @ldionne wrote:

> Does libcxxabi need a similar fix? Otherwise LGTM.

Not sure actually, one doesn't really use libcxxabi in MSVC mode, as one normally would run it on top of the MSVC ABI runtime.

Comment at: libcxx/CMakeLists.txt:582
                                                           -Wno-unused-parameter -Wno-long-long
                                                           -Werror=return-type -Wextra-semi)
curdeius wrote:
> Quuxplusone wrote:
> > LGTM too. I'm in the habit of treating `-W4` as the MSVC equivalent of `-Wall`; you might consider trying out `-W4` here if you haven't already, just for curiosity's sake.
> It would be nice indeed to use `-W4` if possible, and otherwise `-W3` (or lower level).
> If `-W4`/`-W3` is not ok, maybe you might add a FIXME comment and we will work on it later (when a Windows CI builder is available)?
`-W4` actually works fine, amended the commit to include that.

There's D96408 that tries to silence some warnings in `-W4` mode, but when building with CMake, we try to add ` -Wno-unused-parameter` anyway, so the warnings that are fixed there shouldn't show up as long as building with cmake instead of custom project files.

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list