From 16e1a49441c51817697138437d8db2c15bc19cb4 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 2 Nov 2022 10:57:24 -0700 Subject: [PATCH] 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 --- llvm/cmake/modules/HandleLLVMOptions.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index 8be51f74..7828e8a 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. -- 2.7.4