[PATCH] D125263: [CMake][MSVC] Compile with `/permissive-`
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 15 13:44:41 PDT 2022
efriedma added a comment.
Turning this on by default probably makes sense. The documentation does say "By default, the /permissive- option is set in new projects created by Visual Studio 2017 version 15.5 and later versions", so it seems like Microsoft is recommending users do this.
================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:528
# conformance for pointers initialized by using string literals."
append("/Zc:strictStrings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
----------------
I think if we're adding /permissive-, we don't need to explicitly pass Zc:strictStrings or Zc:rvalueCast.
================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:565
+
+ # Standards conformance
+ append("/permissive-" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
----------------
Maybe write out a bit more; something like "Enable standards conformance mode. This ensures handling of various C/C++ constructs is more similar to other compilers."
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125263/new/
https://reviews.llvm.org/D125263
More information about the llvm-commits
mailing list