GN: Enable rtc_common_config for more targets.

In the migration to GN templates, some targets got the whole
rtc_common_config removed, which can have unpredicted consequences
in terms of different code behavior due to defines not being set
as expected etc.
It's better to enable this config and only disable the warnings
that fails the build.

BUG=webrtc:6306,webrtc:6307,webrtc:6308
NOTRY=True

Review-Url: https://codereview.webrtc.org/2347263002
Cr-Commit-Position: refs/heads/master@{#14280}
This commit is contained in:
kjellander 2016-09-18 08:12:29 -07:00 committed by Commit bot
parent 7a0f2c55f5
commit 4a9abad208
3 changed files with 30 additions and 16 deletions

View File

@ -377,8 +377,9 @@ if (is_linux || is_win) {
}
config("peerconnection_client_warnings_config") {
cflags = []
if (is_win && is_clang) {
cflags = [
cflags += [
# Disable warnings failing when compiling with Clang on Windows.
# https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
"-Wno-format",
@ -390,11 +391,18 @@ if (is_linux || is_win) {
]
}
if (is_linux && target_cpu == "x86") {
cflags = [
cflags += [
# Needed to compile on Linux 32-bit.
"-Wno-sentinel",
]
}
if (is_clang) {
# TODO(ehmaldonado): Make peerconnection_client compile with the standard
# set of warnings.
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
cflags += [ "-Wno-inconsistent-missing-override" ]
}
}
rtc_executable("peerconnection_client") {
@ -407,10 +415,6 @@ if (is_linux || is_win) {
"peerconnection/client/peer_connection_client.h",
]
# TODO(ehmaldonado): Make peerconnection_client compile with the standard
# set of warnings.
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
suppressed_configs += [ rtc_common_config ]
if (is_clang) {
# Suppress warnings from the Chromium Clang plugin.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.

View File

@ -169,6 +169,15 @@ rtc_source_set("webrtc_h264") {
}
if (is_ios) {
config("webrtc_h264_video_toolbox_warnings_config") {
if (is_clang) {
# TODO(tkchin): Make webrtc_h264_video_toolbox compile with the standard set
# of warnings.
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6307
cflags = [ "-Wno-thread-safety-analysis" ]
}
}
rtc_source_set("webrtc_h264_video_toolbox") {
sources = [
"codecs/h264/h264_video_toolbox_decoder.cc",
@ -180,15 +189,11 @@ if (is_ios) {
]
configs += [
":webrtc_h264_video_toolbox_warnings_config",
"../..:common_objc",
"//build/config/compiler:enable_arc",
]
# TODO(hbos): Make webrtc_h264_video_toolbox compile with the standard set
# of warnings.
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6307
suppressed_configs += [ rtc_common_config ]
deps = [
"../../sdk:rtc_sdk_common_objc",
]

View File

@ -68,6 +68,15 @@ if (is_ios || (is_mac && mac_deployment_target == "10.7")) {
}
}
config("rtc_sdk_peerconnection_objc_warnings_config") {
if (is_clang) {
# TODO(tkchin): Make rtc_sdk_peerconnection_objc compile with the standard
# set of warnings.
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6308
cflags = [ "-Wno-thread-safety-analysis" ]
}
}
rtc_source_set("rtc_sdk_peerconnection_objc") {
sources = [
"objc/Framework/Classes/RTCAVFoundationVideoSource+Private.h",
@ -185,15 +194,11 @@ if (is_ios || (is_mac && mac_deployment_target == "10.7")) {
}
configs += [
":rtc_sdk_peerconnection_objc_warnings_config",
"..:common_objc",
"//build/config/compiler:enable_arc",
]
# TODO(tkchin): Make rtc_sdk_peerconnection_objc compile with the standard
# set of warnings.
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6308
suppressed_configs += [ rtc_common_config ]
public_configs = [ ":rtc_sdk_common_objc_config" ]
if (is_clang) {