From e7ec227839f2172af91cdd350bf45354180e7b27 Mon Sep 17 00:00:00 2001 From: Tamas Berghammer Date: Fri, 23 Oct 2015 10:34:53 +0000 Subject: [PATCH] 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. Differential revision: http://reviews.llvm.org/D13981 llvm-svn: 251107 --- lldb/cmake/modules/LLDBConfig.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake index 2f2b59b..501b848 100644 --- a/lldb/cmake/modules/LLDBConfig.cmake +++ b/lldb/cmake/modules/LLDBConfig.cmake @@ -210,6 +210,12 @@ if (CXX_SUPPORTS_NO_UNKNOWN_PRAGMAS) 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) -- 2.7.4