[PATCH] D40603: [cmake] Replace -Wall with /W4 in clang-cl options now that -Wall aliases -Weverything

Greg Bedwell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 09:54:34 PST 2017


gbedwell added a comment.

In https://reviews.llvm.org/D40603#939278, @rnk wrote:

> lgtm
>
> This has the side effect of enabling -Wextra for Windows self-host builds. Are we sure we want to do that?


Thanks!

I think so.  This is where this flag aliasing gets a bit messy! :)
Looking at the recent patch:

   def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>;
  -def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>;
  +def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Weverything">,

If the help text is to be believed, clang-cl's /Wall used to map to "-Wall -Wextra" anyway, so if I'm correct this should take us back to the old behaviour.


https://reviews.llvm.org/D40603





More information about the llvm-commits mailing list