Enable GN check for webrtc/{p2p,system_wrappers}
Introduce new small header-only targets in system_wrappers:
:cpu_features_api
:field_trial_api
:metrics_api
to untangle and optimize dependencies but still satisfy GN check.
In webrtc/p2p, previously uncovered header "base/fakecandidatepair.h"
is added to :p2p_test_utils target.
Refactor system_wrappers so 'rtc_p2p' can depend on only
system_wrappers:field_trial_api instead of all of system_wrappers
(which led to a breakage in Chromium that called for the revert of
https://codereview.webrtc.org/2735583002).
BUG=webrtc:6828
NOTRY=True
Review-Url: https://codereview.webrtc.org/2739863002
Cr-Commit-Position: refs/heads/master@{#17812}
diff --git a/webrtc/p2p/BUILD.gn b/webrtc/p2p/BUILD.gn
index a31b7f1..3141c52 100644
--- a/webrtc/p2p/BUILD.gn
+++ b/webrtc/p2p/BUILD.gn
@@ -85,7 +85,10 @@
defines = []
deps = [
+ "../api:libjingle_peerconnection_api",
+ "../api:ortc_api",
"../base:rtc_base",
+ "../system_wrappers:field_trial_api",
]
if (rtc_build_expat) {
@@ -145,6 +148,7 @@
rtc_source_set("p2p_test_utils") {
testonly = true
sources = [
+ "base/fakecandidatepair.h",
"base/fakedtlstransport.h",
"base/fakeicetransport.h",
"base/fakepackettransport.h",
@@ -155,16 +159,15 @@
"base/teststunserver.h",
"base/testturnserver.h",
]
-
deps = [
":rtc_p2p",
+ "../api:ortc_api",
+ "../base:rtc_base",
+ "../base:rtc_base_approved",
+ "../base:rtc_base_tests_utils",
+ "../test:test_support",
"//testing/gmock",
]
-
- if (!build_with_chromium && is_clang) {
- # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
- suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
- }
}
rtc_source_set("rtc_p2p_unittests") {
@@ -205,6 +208,11 @@
":p2p_test_utils",
":rtc_p2p",
"../api:fakemetricsobserver",
+ "../api:ortc_api",
+ "../base:rtc_base",
+ "../base:rtc_base_approved",
+ "../base:rtc_base_tests_utils",
+ "../test:test_support",
"//testing/gmock",
"//testing/gtest",
]
@@ -228,6 +236,7 @@
}
deps = [
+ ":rtc_p2p",
"..:webrtc_common",
"../base:rtc_base",
]
@@ -241,6 +250,10 @@
]
deps = [
":libstunprober",
+ ":p2p_test_utils",
+ ":rtc_p2p",
+ "../base:rtc_base",
+ "../base:rtc_base_tests_utils",
"//testing/gmock",
"//testing/gtest",
]