From: Nico Weber Date: Wed, 23 Dec 2015 02:38:31 +0000 (+0000) Subject: win: Pass /W4 in front of all the -wd flags. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=5a39c0c83b3b07485a09cea2020f78309fb3ce7c;p=oota-llvm.git win: Pass /W4 in front of all the -wd flags. This should fix many many -Wunused-parameter warnings in self-host builds on Windows after r255382. cl.exe doesn't care about the order of /W4 and /wd flags, but clang-cl currently does (just like -Wno-foo -Wall order matters for clang). We might want to change how clang-cl behaves in the future, but until then this change makes self-host builds much more silent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256315 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index d583d0ee95c..4c5ffe2f7b2 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -338,7 +338,10 @@ if( MSVC ) # Enable warnings if (LLVM_ENABLE_WARNINGS) - append("/W4" msvc_warning_flags) + # Put /W4 in front of all the -we flags. cl.exe doesn't care, but for + # clang-cl having /W4 after the -we flags will re-enable the warnings + # disabled by -we. + set(msvc_warning_flags "/W4 ${msvc_warning_flags}") # CMake appends /W3 by default, and having /W3 followed by /W4 will result in # cl : Command line warning D9025 : overriding '/W3' with '/W4'. Since this is # a command line warning and not a compiler warning, it cannot be suppressed except