enabling gn check on the whole WebRTC repo

BUG=webrtc:6828
NOTRY=True

Review-Url: https://codereview.webrtc.org/2918803002
Cr-Commit-Position: refs/heads/master@{#18390}
This commit is contained in:
mbonadei 2017-06-01 13:01:48 -07:00 committed by Commit Bot
parent 3d4b83da91
commit 7d9a55b92d
3 changed files with 47 additions and 22 deletions

23
.gn
View File

@ -20,28 +20,7 @@ secondary_source = "//build/secondary/"
# matching these patterns (see "gn help label_pattern" for format) will have # matching these patterns (see "gn help label_pattern" for format) will have
# their includes checked for proper dependencies when you run either # their includes checked for proper dependencies when you run either
# "gn check" or "gn gen --check". # "gn check" or "gn gen --check".
# TODO(kjellander): Keep adding paths to this list as work in webrtc:5589 is done. check_targets = [ "//webrtc/*" ]
check_targets = [
"//webrtc/api/*",
"//webrtc/audio/*",
"//webrtc/base/*",
"//webrtc/call/*",
"//webrtc/common_video/*",
"//webrtc/common_audio/*",
"//webrtc/examples/*",
"//webrtc/logging/*",
"//webrtc/media/*",
"//webrtc/modules/*",
"//webrtc/ortc/*",
"//webrtc/p2p/*",
"//webrtc/sdk/*",
"//webrtc/stats/*",
"//webrtc/system_wrappers/*",
"//webrtc/test/*",
"//webrtc/tools/*",
"//webrtc/video/*",
"//webrtc/voice_engine/*",
]
# These are the list of GN files that run exec_script. This whitelist exists # These are the list of GN files that run exec_script. This whitelist exists
# to force additional review for new uses of exec_script, which is strongly # to force additional review for new uses of exec_script, which is strongly

View File

@ -229,6 +229,12 @@ rtc_source_set("video_stream_api") {
"video_receive_stream.h", "video_receive_stream.h",
"video_send_stream.h", "video_send_stream.h",
] ]
deps = [
":webrtc_common",
"api:transport_api",
"base:rtc_base_approved",
"common_video:common_video",
]
} }
# Contents of video_frame.h is moved from top-level down to common_video/. # Contents of video_frame.h is moved from top-level down to common_video/.
@ -349,6 +355,13 @@ if (!build_with_chromium) {
} }
rtc_static_library("webrtc_common") { rtc_static_library("webrtc_common") {
# TODO(mbonadei): Remove (bugs.webrtc.org/7745)
# Enabling GN check triggers cyclic dependency error:
# //webrtc:webrtc_common ->
# //webrtc/api:video_frame_api ->
# //webrtc/system_wrappers:system_wrappers ->
# //webrtc:webrtc_common
check_includes = false
sources = [ sources = [
"common_types.cc", "common_types.cc",
"common_types.h", "common_types.h",
@ -361,6 +374,9 @@ rtc_static_library("webrtc_common") {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
} }
deps = [
"base:rtc_base_approved",
]
} }
if (use_libfuzzer || use_drfuzz || use_afl) { if (use_libfuzzer || use_drfuzz || use_afl) {

View File

@ -54,9 +54,14 @@ rtc_static_library("rtc_pc") {
] ]
deps = [ deps = [
"..:webrtc_common",
"../api:call_api", "../api:call_api",
"../api:libjingle_peerconnection_api",
"../api:ortc_api",
"../base:rtc_base", "../base:rtc_base",
"../common_video:common_video",
"../media", "../media",
"../p2p:rtc_p2p",
] ]
if (rtc_build_libsrtp) { if (rtc_build_libsrtp) {
@ -142,12 +147,21 @@ rtc_static_library("libjingle_peerconnection") {
deps = [ deps = [
":rtc_pc", ":rtc_pc",
"..:webrtc_common",
"../api:call_api", "../api:call_api",
"../api:rtc_stats_api", "../api:rtc_stats_api",
"../api/audio_codecs:builtin_audio_decoder_factory",
"../api/audio_codecs:builtin_audio_encoder_factory",
"../api/video_codecs:video_codecs_api", "../api/video_codecs:video_codecs_api",
"../base:rtc_base",
"../base:rtc_base_approved",
"../call", "../call",
"../logging:rtc_event_log_api",
"../media", "../media",
"../modules/audio_device:audio_device",
"../p2p:rtc_p2p",
"../stats", "../stats",
"../system_wrappers:system_wrappers",
] ]
public_deps = [ public_deps = [
@ -208,9 +222,15 @@ if (rtc_include_tests) {
deps = [ deps = [
":libjingle_peerconnection", ":libjingle_peerconnection",
":rtc_pc", ":rtc_pc",
"../base:rtc_base",
"../base:rtc_base_approved",
"../base:rtc_base_tests_main", "../base:rtc_base_tests_main",
"../base:rtc_base_tests_utils", "../base:rtc_base_tests_utils",
"../logging:rtc_event_log_api",
"../media:rtc_media_base",
"../media:rtc_media_tests_utils", "../media:rtc_media_tests_utils",
"../p2p:p2p_test_utils",
"../p2p:rtc_p2p",
"../system_wrappers:metrics_default", "../system_wrappers:metrics_default",
] ]
@ -245,7 +265,17 @@ if (rtc_include_tests) {
deps = [ deps = [
":libjingle_peerconnection", ":libjingle_peerconnection",
"..:webrtc_common",
"../api:libjingle_peerconnection_test_api",
"../api:rtc_stats_api",
"../base:rtc_base",
"../base:rtc_base_approved",
"../base:rtc_base_tests_utils", "../base:rtc_base_tests_utils",
"../media:rtc_media",
"../media:rtc_media_tests_utils",
"../modules/audio_device:audio_device",
"../p2p:p2p_test_utils",
"../test:test_support",
"//testing/gmock", "//testing/gmock",
] ]