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

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Mar 5 07:00:19 PST 2021


curdeius added inline comments.


================
Comment at: libcxx/CMakeLists.txt:575-582
+  if (NOT MSVC)
+    # Don't add -Wall with clang-cl; in cl.exe mode, -Wall (or /Wall) means
+    # the same as -Weverything in a GCC like driver.
+    target_add_compile_flags_if_supported(${target} PRIVATE -Wall)
+  else()
+    # -W4 is the cl.exe equivalent of -Wall
+    target_add_compile_flags_if_supported(${target} PRIVATE -W4)
----------------
Nit: better to write `if (MSVC) ... else ... ` (without negation+else).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98035/new/

https://reviews.llvm.org/D98035



More information about the libcxx-commits mailing list