From 550a1ca57610686a6b4886d912e8e3423bb4f493 Mon Sep 17 00:00:00 2001 From: Andrew Kaylor Date: Tue, 21 Apr 2015 22:29:38 +0000 Subject: [PATCH] Silence MSVC build alignment warnings git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235450 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/HandleLLVMOptions.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index 27147dcfd29..71a1902dcdd 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -304,7 +304,15 @@ if( MSVC ) -wd4611 # Suppress 'interaction between '_setjmp' and C++ object destruction is non-portable' -wd4805 # Suppress 'unsafe mix of type and type in operation' -wd4204 # Suppress 'nonstandard extension used : non-constant aggregate initializer' - + + # Idelly, 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 marco), 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.