[lldb] Guard some GCC-style flags from MSVC

A follow up to #92953. Suggested in https://github.com/llvm/llvm-project/pull/92953#issuecomment-2143274065
This commit is contained in:
Vlad Serebrennikov 2024-06-01 12:47:49 +03:00
parent 16397e8ec7
commit cd676e5b27

View File

@ -186,13 +186,15 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
# printed. Therefore, check for whether the compiler supports options in the
# form -W<foo>, and if supported, add the corresponding -Wno-<foo> option.
# Disable GCC warnings
append("-Wno-deprecated-declarations" CMAKE_CXX_FLAGS)
append("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS)
append("-Wno-strict-aliasing" CMAKE_CXX_FLAGS)
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
# Disable GCC warnings
append("-Wno-deprecated-declarations" CMAKE_CXX_FLAGS)
append("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS)
append("-Wno-strict-aliasing" CMAKE_CXX_FLAGS)
check_cxx_compiler_flag("-Wstringop-truncation" CXX_SUPPORTS_STRINGOP_TRUNCATION)
append_if(CXX_SUPPORTS_STRINGOP_TRUNCATION "-Wno-stringop-truncation" CMAKE_CXX_FLAGS)
check_cxx_compiler_flag("-Wstringop-truncation" CXX_SUPPORTS_STRINGOP_TRUNCATION)
append_if(CXX_SUPPORTS_STRINGOP_TRUNCATION "-Wno-stringop-truncation" CMAKE_CXX_FLAGS)
endif()
# Disable Clang warnings
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")