Update warnings for newer clang.

There are a few warnings appearing with newer Clang. This CL disables
them.

Change-Id: I6d665ba7e9df8e1078e062b63296ad9bfaf16cd6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116550
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
dan sinclair 2023-01-07 23:09:14 +00:00 committed by Dawn LUCI CQ
parent 797cbf4f58
commit cf2456babf
2 changed files with 12 additions and 0 deletions

View File

@ -318,6 +318,8 @@ function(common_compile_options TARGET)
target_compile_options(${TARGET} PRIVATE
-fno-exceptions
-fno-rtti
-Wno-deprecated-builtins
)
if (${DAWN_ENABLE_MSAN})
@ -540,6 +542,7 @@ function(tint_default_compile_options TARGET)
-Wno-return-std-move-in-c++11
-Wno-unknown-warning-option
-Wno-undefined-var-template
-Wno-unsafe-buffer-usage
-Wno-used-but-marked-unused
-Weverything
)

View File

@ -64,6 +64,15 @@ endif()
if (NOT TARGET libabsl)
message(STATUS "Dawn: using Abseil at ${DAWN_ABSEIL_DIR}")
if (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR
("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang"))
add_compile_options(
-Wno-array-parameter
-Wno-deprecated-builtins
-Wno-unknown-warning-option
)
endif()
add_subdirectory(${DAWN_ABSEIL_DIR} "${CMAKE_CURRENT_BINARY_DIR}/abseil")
endif()