Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: webrtc/pc/BUILD.gn

Issue 2854123003: Build WebRTC with data channel only. (Closed)
Patch Set: Add a Java level test. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 3 # Use of this source code is governed by a BSD-style license
4 # that can be found in the LICENSE file in the root of the source 4 # that can be found in the LICENSE file in the root of the source
5 # tree. An additional intellectual property rights grant can be found 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 import("../webrtc.gni") 9 import("../webrtc.gni")
10 if (is_android) { 10 if (is_android) {
11 import("//build/config/android/config.gni") 11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni") 12 import("//build/config/android/rules.gni")
13 } 13 }
14 14
15 group("pc") { 15 group("pc") {
16 public_deps = [ 16 public_deps = [
17 ":rtc_pc", 17 ":rtc_pc",
18 ] 18 ]
19 } 19 }
20 20
21 config("rtc_pc_config") { 21 config("rtc_pc_config") {
22 defines = [] 22 defines = []
23 if (rtc_enable_sctp) { 23 if (rtc_enable_sctp) {
24 defines += [ "HAVE_SCTP" ] 24 defines += [ "HAVE_SCTP" ]
25 } 25 }
26 } 26 }
27 27
28 rtc_static_library("rtc_pc") { 28 rtc_static_library("rtc_pc_base") {
29 defines = [] 29 defines = []
30 sources = [ 30 sources = [
31 "audiomonitor.cc", 31 "audiomonitor.cc",
32 "audiomonitor.h", 32 "audiomonitor.h",
33 "bundlefilter.cc", 33 "bundlefilter.cc",
34 "bundlefilter.h", 34 "bundlefilter.h",
35 "channel.cc", 35 "channel.cc",
36 "channel.h", 36 "channel.h",
37 "channelmanager.cc", 37 "channelmanager.cc",
38 "channelmanager.h", 38 "channelmanager.h",
(...skipping 10 matching lines...) Expand all
49 "rtptransport.cc", 49 "rtptransport.cc",
50 "rtptransport.h", 50 "rtptransport.h",
51 "srtpfilter.cc", 51 "srtpfilter.cc",
52 "srtpfilter.h", 52 "srtpfilter.h",
53 "voicechannel.h", 53 "voicechannel.h",
54 ] 54 ]
55 55
56 deps = [ 56 deps = [
57 "../api:call_api", 57 "../api:call_api",
58 "../base:rtc_base", 58 "../base:rtc_base",
59 "../media", 59 "../media:rtc_data",
60 ] 60 ]
61 61
62 if (rtc_build_libsrtp) { 62 if (rtc_build_libsrtp) {
63 deps += [ "//third_party/libsrtp" ] 63 deps += [ "//third_party/libsrtp" ]
64 } 64 }
65 65
66 public_configs = [ ":rtc_pc_config" ] 66 public_configs = [ ":rtc_pc_config" ]
67 67
68 if (!build_with_chromium && is_clang) { 68 if (!build_with_chromium && is_clang) {
69 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 69 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
70 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 70 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
71 } 71 }
72 } 72 }
73 73
74 # TODO(zhihuang): Remove this once the downstream dependencies start using the
75 # modular targets.
76 rtc_static_library("rtc_pc") {
77 public_deps = [
78 ":rtc_pc_base",
79 ]
80
81 deps = [
82 "../media:rtc_audio_video",
83 ]
84 }
85
74 config("libjingle_peerconnection_warnings_config") { 86 config("libjingle_peerconnection_warnings_config") {
75 # GN orders flags on a target before flags from configs. The default config 87 # GN orders flags on a target before flags from configs. The default config
76 # adds these flags so to cancel them out they need to come from a config and 88 # adds these flags so to cancel them out they need to come from a config and
77 # cannot be on the target directly. 89 # cannot be on the target directly.
78 if (!is_win && !is_clang) { 90 if (!is_win && !is_clang) {
79 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC. 91 cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
80 } 92 }
81 } 93 }
82 94
83 rtc_static_library("libjingle_peerconnection") { 95 rtc_static_library("webrtc_null_audio") {
kjellander_webrtc 2017/05/29 20:59:15 How about using rtc instead of webrtc in all these
Taylor Brandstetter 2017/05/30 17:30:52 It would be useful to have a comment explaining ho
Zhi Huang 2017/05/31 00:03:29 Done.
Zhi Huang 2017/05/31 00:03:29 Sounds good to me.
Zhi Huang 2017/05/31 03:55:37 I just realized that if we follow the "rtc_..." pa
kjellander_webrtc 2017/06/01 05:34:30 AFAIK that is OK but you won't be able to build rt
96 sources = [
97 "nullaudiofactory.cc",
98 ]
99
100 if (!build_with_chromium && is_clang) {
101 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
102 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
103 }
104 }
105
106 rtc_static_library("webrtc_audio") {
107 sources = [
108 "audiofactory.cc",
109 ]
110
111 public_deps = [
112 "../media:rtc_audio_video",
113 ]
114
115 if (!build_with_chromium && is_clang) {
116 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
117 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
118 }
119 }
120
121 rtc_static_library("webrtc_null_media") {
122 sources = [
123 "nullmediafactory.cc",
124 ]
125
126 if (!build_with_chromium && is_clang) {
127 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
128 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
129 }
130 }
131
132 rtc_static_library("webrtc_media") {
133 sources = [
134 "mediafactory.cc",
135 ]
136
137 deps = [
138 "../call",
139 "../media:rtc_audio_video",
140 ]
141
142 if (!build_with_chromium && is_clang) {
143 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
144 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
145 }
146 }
147
148 rtc_static_library("webrtc_peerconnection") {
84 cflags = [] 149 cflags = []
85 sources = [ 150 sources = [
86 "audiotrack.cc", 151 "audiotrack.cc",
87 "audiotrack.h", 152 "audiotrack.h",
88 "datachannel.cc", 153 "datachannel.cc",
89 "datachannel.h", 154 "datachannel.h",
90 "dtmfsender.cc", 155 "dtmfsender.cc",
91 "dtmfsender.h", 156 "dtmfsender.h",
92 "iceserverparsing.cc", 157 "iceserverparsing.cc",
93 "iceserverparsing.h", 158 "iceserverparsing.h",
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 ] 199 ]
135 200
136 configs += [ ":libjingle_peerconnection_warnings_config" ] 201 configs += [ ":libjingle_peerconnection_warnings_config" ]
137 202
138 if (!build_with_chromium && is_clang) { 203 if (!build_with_chromium && is_clang) {
139 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 204 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
140 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 205 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
141 } 206 }
142 207
143 deps = [ 208 deps = [
144 ":rtc_pc", 209 ":rtc_pc_base",
145 "../api:call_api", 210 "../api:call_api",
146 "../api:rtc_stats_api", 211 "../api:rtc_stats_api",
147 "../api/video_codecs:video_codecs_api", 212 "../api/video_codecs:video_codecs_api",
148 "../call", 213 "../logging:rtc_event_log_api",
149 "../media",
150 "../stats", 214 "../stats",
151 ] 215 ]
152 216
153 public_deps = [ 217 public_deps = [
154 "../api:libjingle_peerconnection_api", 218 "../api:libjingle_peerconnection_api",
155 ] 219 ]
220 }
221
222 # TODO(zhihuang): Remove this once the downstream dependencies start using the
223 # modular targets.
224 rtc_static_library("libjingle_peerconnection") {
225 public_deps = [
226 ":webrtc_audio",
227 ":webrtc_media",
228 ":webrtc_peerconnection",
229 "../api:libjingle_peerconnection_api",
230 ]
156 231
157 if (rtc_use_quic) { 232 if (rtc_use_quic) {
158 sources += [ 233 sources += [
159 "quicdatachannel.cc", 234 "quicdatachannel.cc",
160 "quicdatachannel.h", 235 "quicdatachannel.h",
161 "quicdatatransport.cc", 236 "quicdatatransport.cc",
162 "quicdatatransport.h", 237 "quicdatatransport.h",
163 ] 238 ]
164 deps += [ "//third_party/libquic" ] 239 deps += [ "//third_party/libquic" ]
165 public_deps = [ 240 public_deps = [
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 "test/mock_peerconnection.h", 312 "test/mock_peerconnection.h",
238 "test/mock_webrtcsession.h", 313 "test/mock_webrtcsession.h",
239 "test/mockpeerconnectionobservers.h", 314 "test/mockpeerconnectionobservers.h",
240 "test/peerconnectiontestwrapper.cc", 315 "test/peerconnectiontestwrapper.cc",
241 "test/peerconnectiontestwrapper.h", 316 "test/peerconnectiontestwrapper.h",
242 "test/rtcstatsobtainer.h", 317 "test/rtcstatsobtainer.h",
243 "test/testsdpstrings.h", 318 "test/testsdpstrings.h",
244 ] 319 ]
245 320
246 deps = [ 321 deps = [
247 ":libjingle_peerconnection",
248 "../base:rtc_base_tests_utils", 322 "../base:rtc_base_tests_utils",
249 "//testing/gmock", 323 "//testing/gmock",
250 ] 324 ]
251 325
252 if (!build_with_chromium && is_clang) { 326 if (!build_with_chromium && is_clang) {
253 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 327 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
254 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 328 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
255 } 329 }
256 } 330 }
257 331
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 "../system_wrappers:metrics_default", 435 "../system_wrappers:metrics_default",
362 "//testing/gmock", 436 "//testing/gmock",
363 ] 437 ]
364 438
365 if (is_android) { 439 if (is_android) {
366 deps += [ "//testing/android/native_test:native_test_support" ] 440 deps += [ "//testing/android/native_test:native_test_support" ]
367 441
368 shard_timeout = 900 442 shard_timeout = 900
369 } 443 }
370 } 444 }
445
446 rtc_test("peerconnection_datachannelonly_unittests") {
447 check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828)
kjellander_webrtc 2017/05/29 20:59:15 Is it possible to avoid this?
Zhi Huang 2017/05/31 00:03:29 Yep. :)
448 testonly = true
449 sources = [
450 "peerconnection_datachannelonly_unittest.cc",
451 ]
452
453 if (rtc_enable_sctp) {
454 defines = [ "HAVE_SCTP" ]
455 }
456
457 configs += [ ":peerconnection_unittests_config" ]
458
459 if (!build_with_chromium && is_clang) {
460 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
461 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
462 }
463
464 # TODO(jschuh): Bug 1348: fix this warning.
465 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
466
467 if (is_win) {
468 cflags = [
469 "/wd4245", # conversion from int to size_t, signed/unsigned mismatch.
470 "/wd4389", # signed/unsigned mismatch.
471 ]
472 }
473
474 deps = []
475 if (is_android) {
476 sources += [
477 "test/androidtestinitializer.cc",
478 "test/androidtestinitializer.h",
479 ]
480 deps += [
481 "//testing/android/native_test:native_test_support",
482 "//webrtc/sdk/android:base_jni",
483 "//webrtc/sdk/android:libjingle_peerconnection_java",
484 "//webrtc/sdk/android:webrtc_null_audio_jni",
485 "//webrtc/sdk/android:webrtc_null_video_jni",
486 ]
487 }
488
489 deps += [
490 ":pc_test_utils",
491 ":webrtc_null_audio",
492 ":webrtc_null_media",
493 ":webrtc_peerconnection",
494 "..:webrtc_common",
495 "../api:fakemetricsobserver",
496 "../base:rtc_base_tests_main",
497 "../base:rtc_base_tests_utils",
498 "../media:rtc_media_tests_utils",
499 "../pc:rtc_pc_base",
500 "../system_wrappers:metrics_default",
501 "//testing/gmock",
502 ]
503
504 if (is_android) {
505 deps += [ "//testing/android/native_test:native_test_support" ]
506
kjellander_webrtc 2017/05/29 20:59:15 Remove blank line.
Zhi Huang 2017/05/31 00:03:29 Done.
507 shard_timeout = 900
508 }
509 }
371 } 510 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698