kjellander b62dbbe985 GN: Change rtc_source_set targets --> rtc_static_library
This changes most non-test related rtc_source_set targets to be
rtc_static_library instead. Targets without any .cc files are excluded.
This should bring back the build behavior we used to have with GYP
(i.e. same symbols exported in the libjingle_peerconnection.a file, which
are used by some downstream projects).

After doing an Android build with these changes:
$ nm --defined-only -g -C out/Release/lib.unstripped/libjingle_peerconnection_so.so | grep -i createpeerconnectionf
00077c51 T Java_org_webrtc_PeerConnectionFactory_nativeCreatePeerConnectionFactory
$ nm --defined-only -g -C out/Release/obj/webrtc/api/libjingle_peerconnection.a | grep -i createpeerconnectionf
00000001 T webrtc::CreatePeerConnectionFactory(rtc::Thread*, rtc::Thread*, rtc::Thread*, webrtc::AudioDeviceModule*, cricket::WebRtcVideoEncoderFactory*, cricket::WebRtcVideoDecoderFactory*)
00000001 T webrtc::CreatePeerConnectionFactory()

See https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cookbook.md#Note-on-static-libraries
for more details on this.

NOTICE: This should be further cleaned up in the future, to reduce
binary bloat and unnecessary linking time. Right now it's more
important to restore the desired build output though.

BUG=webrtc:6410, chromium:630755

Review-Url: https://codereview.webrtc.org/2361623004
Cr-Commit-Position: refs/heads/master@{#14364}
2016-09-23 07:38:58 +00:00

110 lines
3.2 KiB
Plaintext

# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
import("../build/webrtc.gni")
rtc_static_library("video") {
sources = [
"call_stats.cc",
"call_stats.h",
"encoder_state_feedback.cc",
"encoder_state_feedback.h",
"overuse_frame_detector.cc",
"overuse_frame_detector.h",
"payload_router.cc",
"payload_router.h",
"receive_statistics_proxy.cc",
"receive_statistics_proxy.h",
"report_block_stats.cc",
"report_block_stats.h",
"rtp_stream_receiver.cc",
"rtp_stream_receiver.h",
"rtp_streams_synchronizer.cc",
"rtp_streams_synchronizer.h",
"send_delay_stats.cc",
"send_delay_stats.h",
"send_statistics_proxy.cc",
"send_statistics_proxy.h",
"stats_counter.cc",
"stats_counter.h",
"stream_synchronization.cc",
"stream_synchronization.h",
"video_decoder.cc",
"video_encoder.cc",
"video_receive_stream.cc",
"video_receive_stream.h",
"video_send_stream.cc",
"video_send_stream.h",
"video_stream_decoder.cc",
"video_stream_decoder.h",
"vie_encoder.cc",
"vie_encoder.h",
"vie_remb.cc",
"vie_remb.h",
]
if (is_clang) {
# Suppress warnings from Chrome's Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
deps = [
"..:rtc_event_log",
"..:webrtc_common",
"../base:rtc_base_approved",
"../base:rtc_task_queue",
"../common_video",
"../modules/bitrate_controller",
"../modules/congestion_controller",
"../modules/pacing",
"../modules/remote_bitrate_estimator",
"../modules/rtp_rtcp",
"../modules/utility",
"../modules/video_capture:video_capture_module",
"../modules/video_coding",
"../modules/video_processing",
"../system_wrappers",
"../voice_engine",
]
}
if (rtc_include_tests) {
# TODO(pbos): Rename test suite.
rtc_source_set("video_tests") {
testonly = true
sources = [
"call_stats_unittest.cc",
"encoder_state_feedback_unittest.cc",
"end_to_end_tests.cc",
"overuse_frame_detector_unittest.cc",
"payload_router_unittest.cc",
"report_block_stats_unittest.cc",
"send_delay_stats_unittest.cc",
"send_statistics_proxy_unittest.cc",
"stats_counter_unittest.cc",
"stream_synchronization_unittest.cc",
"video_decoder_unittest.cc",
"video_encoder_unittest.cc",
"video_send_stream_tests.cc",
"vie_encoder_unittest.cc",
"vie_remb_unittest.cc",
]
deps = [
":video",
"//testing/gmock",
"//testing/gtest",
]
if (is_clang) {
# Suppress warnings from the Chromium Clang plugin.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}
}