Disable warning when building gmock tests

On recent clang builds, some gmock tests are failing to build:

FAILED: obj/third_party/gtest/gtest/googlemock/test/gmock_all_test.gmock-actions_test.o
../../third_party/linux/clang/linux-amd64/bin/clang++ -MMD -MF obj/third_party/gtest/gtest/googlemock/test/gmock_all_test.gmock-actions_test.o.d -D_FILE_OFFSET_BITS=64 -DGUNIT_NO_GOOGLE3=1 -I../../third_party/gtest/gtest/googlemock -I../../third_party/gtest/gtest/googletest -I../../third_party/gtest/gtest/googlemock/include -I../../third_party/gtest/gtest/googletest/include -Wall -Wendif-labels -Werror -Wextra -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wsign-compare -fno-exceptions -fno-rtti -fno-strict-aliasing -fobjc-call-cxx-cdtors -fstack-protector-all -fvisibility-inlines-hidden -fvisibility=hidden -Wheader-hygiene -Wnewline-eof -Wstring-conversion -stdlib=libstdc++ -fPIC -Wimplicit-fallthrough --sysroot=../../third_party/linux/sysroot -pthread -Wexit-time-destructors -Wno-unused-private-field -std=c++14 -Wno-inconsistent-missing-override -c ../../third_party/gtest/gtest/googlemock/test/gmock-actions_test.cc -o obj/third_party/gtest/gtest/googlemock/test/gmock_all_test.gmock-actions_test.o
../../third_party/gtest/gtest/googlemock/test/gmock-actions_test.cc:109:37: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
  EXPECT_EQ(0U, BuiltInDefaultValue<unsigned wchar_t>::Get());
                                    ^
...

Disable this warning for now.

Change-Id: Ibd41a6fc12d1f13eca5227775e2559ccf3baf229
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1754722
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Scott Graham 2019-08-14 13:48:25 -07:00 committed by Commit Bot
parent 08f070325e
commit a34bca8611

View File

@ -267,6 +267,17 @@ if (crashpad_is_in_chromium) {
config("gmock_private_config") {
visibility = [ ":*" ]
include_dirs = [ "gtest/googlemock" ]
if (crashpad_is_clang && (crashpad_is_linux || crashpad_is_fuchsia)) {
cflags_cc = [
# This seems a bit questionable:
# https://github.com/google/googletest/blob/bf6df7eaee5cfaafe2655fab143f348eba98c9af/googlemock/include/gmock/internal/gmock-internal-utils.h#L109
# and causes a warning/error on recent clangs (Linux/Fuchsia currently
# have this, other platforms don't yet).
# Temporarily disable this warning for building gmock tests until
# internal CL 263406158 lands and rolls.
"-Wno-signed-unsigned-wchar",
]
}
}
config("gmock_public_config") {