Reland "New build target p2p:stun_types"
This is a reland of 5b4fcb5bf69218c2f42ca2b0cada6c15f2f638e9
Original change's description:
> New build target p2p:stun_types
>
> The media:rtc_media_base target needs definitions of various
> stun-related types and constant. With this new smaller target, it no
> longer needs to depend on all of p2p.
>
> Bug: webrtc:8733
> Change-Id: I05910b6915f6d2c96e8f52a017adbc7eb693dca8
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150945
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29036}
Tbr: steveanton@webrtc.org
Bug: webrtc:8733
Change-Id: I1847007ecf29e0e6a27f559b92df632a1cd69280
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151880
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29092}
diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn
index bc80b75..1583cfb 100644
--- a/p2p/BUILD.gn
+++ b/p2p/BUILD.gn
@@ -15,9 +15,17 @@
]
}
-# TODO(bugs.webrtc.org/8733): Move base/stun.{h,cc} into this target,
-# after downstream dependencies are updated.
rtc_source_set("stun_types") {
+ sources = [
+ "base/stun.cc",
+ "base/stun.h",
+ ]
+ deps = [
+ "../rtc_base:checks",
+ "../rtc_base:rtc_base",
+ "../rtc_base:rtc_base_approved",
+ "//third_party/abseil-cpp/absl/memory",
+ ]
}
rtc_static_library("rtc_p2p") {
@@ -66,8 +74,6 @@
"base/regathering_controller.h",
"base/relay_port.cc",
"base/relay_port.h",
- "base/stun.cc",
- "base/stun.h",
"base/stun_port.cc",
"base/stun_port.h",
"base/stun_request.cc",
@@ -91,6 +97,7 @@
]
deps = [
+ ":stun_types",
"../api:libjingle_peerconnection_api",
"../api:packet_socket_factory",
"../api:scoped_refptr",
@@ -163,6 +170,7 @@
":fake_port_allocator",
":p2p_server_utils",
":rtc_p2p",
+ ":stun_types",
"../api:libjingle_peerconnection_api",
"../api:packet_socket_factory",
"../rtc_base",
@@ -209,6 +217,7 @@
":p2p_server_utils",
":p2p_test_utils",
":rtc_p2p",
+ ":stun_types",
"../api:libjingle_peerconnection_api",
"../api:scoped_refptr",
"../api/units:time_delta",
@@ -242,6 +251,7 @@
]
deps = [
":rtc_p2p",
+ ":stun_types",
"../rtc_base",
"../rtc_base:checks",
"../rtc_base:rtc_base_tests_utils",
@@ -260,6 +270,7 @@
deps = [
":rtc_p2p",
+ ":stun_types",
"../rtc_base",
"../rtc_base:checks",
"../rtc_base/system:rtc_export",