[llvm] 16e1a49 - Revert "[cmake][msvc] Enable standards-conforming preprocessor"

Jan Svoboda via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 10:58:50 PDT 2022


Author: Jan Svoboda
Date: 2022-11-02T10:58:26-07:00
New Revision: 16e1a49441c51817697138437d8db2c15bc19cb4

URL: https://github.com/llvm/llvm-project/commit/16e1a49441c51817697138437d8db2c15bc19cb4
DIFF: https://github.com/llvm/llvm-project/commit/16e1a49441c51817697138437d8db2c15bc19cb4.diff

LOG: Revert "[cmake][msvc] Enable standards-conforming preprocessor"

This reverts commit 12d8e7c6ade55bba241259312e3e4bdcf6aeab81.

The Windows MLIR buildbot started failing with:

C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9531): error C2220: the following warning is treated as an error
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9531): warning C5105: macro expansion producing 'defined' has undefined behavior
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winbase.h(9531): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings

Added: 
    

Modified: 
    llvm/cmake/modules/HandleLLVMOptions.cmake

Removed: 
    


################################################################################
diff  --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 8be51f74a9814..7828e8a1627f2 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -481,10 +481,6 @@ if( MSVC )
 
   append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
 
-  # Enable standards-conforming preprocessor.
-  # https://learn.microsoft.com/en-us/cpp/build/reference/zc-preprocessor
-  append("/Zc:preprocessor" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-
   # Some projects use the __cplusplus preprocessor macro to check support for
   # a particular version of the C++ standard. When this option is not specified
   # explicitly, macro's value is "199711L" that implies C++98 Standard.


        


More information about the llvm-commits mailing list