[Lldb-commits] [PATCH] D13981: Disable the strict-aliasing warnings produced by gcc
Tamas Berghammer via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 22 05:28:07 PDT 2015
tberghammer created this revision.
tberghammer added reviewers: clayborg, brucem.
tberghammer added a subscriber: lldb-commits.
Disable the strict-aliasing warnings produced by gcc
GCC produce a lot of strict-aliasing warning for the LLDB codebase
what makes reading the compile output very difficult. This change
disable these warnings to reduce the noise as we already ignore them.
We should consider re-enabling the warning if we fix all (or most)
strict-aliasing violation first.
http://reviews.llvm.org/D13981
Files:
cmake/modules/LLDBConfig.cmake
Index: cmake/modules/LLDBConfig.cmake
===================================================================
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -210,6 +210,12 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")
endif ()
+check_cxx_compiler_flag("-Wno-strict-aliasing"
+ CXX_SUPPORTS_NO_STRICT_ALIASING)
+if (CXX_SUPPORTS_NO_STRICT_ALIASING)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing")
+endif ()
+
# Disable Clang warnings
check_cxx_compiler_flag("-Wno-deprecated-register"
CXX_SUPPORTS_NO_DEPRECATED_REGISTER)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13981.38115.patch
Type: text/x-patch
Size: 637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151022/52a17dc6/attachment.bin>
More information about the lldb-commits
mailing list