[llvm] r367409 - Re-disable C4324 MSVC warning that was enabled in D65458 / rL367383

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 04:06:05 PDT 2019


Author: rksimon
Date: Wed Jul 31 04:06:05 2019
New Revision: 367409

URL: http://llvm.org/viewvc/llvm-project?rev=367409&view=rev
Log:
Re-disable C4324 MSVC warning that was enabled in D65458 / rL367383

This was breaking /WX builds

Modified:
    llvm/trunk/cmake/modules/HandleLLVMOptions.cmake

Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=367409&r1=367408&r2=367409&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Wed Jul 31 04:06:05 2019
@@ -530,6 +530,14 @@ if (MSVC)
           # is fixed.
       -wd4709 # Suppress comma operator within array index expression
 
+      # Ideally, we'd like this warning to be enabled, but MSVC 2013 doesn't
+      # support the 'aligned' attribute in the way that clang sources requires (for
+      # any code that uses the LLVM_ALIGNAS macro), so this is must be disabled to
+      # avoid unwanted alignment warnings.
+      # When we switch to requiring a version of MSVC that supports the 'alignas'
+      # specifier (MSVC 2015?) this warning can be re-enabled.
+      -wd4324 # Suppress 'structure was padded due to __declspec(align())'
+
       # Promoted warnings.
       -w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.
 




More information about the llvm-commits mailing list