From b62dbbe985c643cf4ee28e4c73c75bb3ef5e4d54 Mon Sep 17 00:00:00 2001 From: kjellander Date: Fri, 23 Sep 2016 00:38:52 -0700 Subject: [PATCH] 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} --- webrtc/BUILD.gn | 6 +-- webrtc/api/BUILD.gn | 4 +- webrtc/audio/BUILD.gn | 2 +- webrtc/call/BUILD.gn | 2 +- webrtc/common_audio/BUILD.gn | 6 +-- webrtc/common_video/BUILD.gn | 2 +- webrtc/examples/BUILD.gn | 8 ++-- webrtc/libjingle/xmllite/BUILD.gn | 2 +- webrtc/libjingle/xmpp/BUILD.gn | 2 +- webrtc/media/BUILD.gn | 2 +- webrtc/modules/audio_coding/BUILD.gn | 38 +++++++++---------- .../modules/audio_conference_mixer/BUILD.gn | 2 +- webrtc/modules/audio_device/BUILD.gn | 2 +- webrtc/modules/audio_mixer/BUILD.gn | 2 +- webrtc/modules/audio_processing/BUILD.gn | 8 ++-- webrtc/modules/bitrate_controller/BUILD.gn | 2 +- webrtc/modules/congestion_controller/BUILD.gn | 2 +- webrtc/modules/desktop_capture/BUILD.gn | 6 +-- webrtc/modules/media_file/BUILD.gn | 2 +- webrtc/modules/pacing/BUILD.gn | 2 +- .../modules/remote_bitrate_estimator/BUILD.gn | 4 +- webrtc/modules/rtp_rtcp/BUILD.gn | 2 +- webrtc/modules/utility/BUILD.gn | 2 +- webrtc/modules/video_capture/BUILD.gn | 6 +-- webrtc/modules/video_coding/BUILD.gn | 14 +++---- webrtc/modules/video_processing/BUILD.gn | 6 +-- webrtc/p2p/BUILD.gn | 4 +- webrtc/pc/BUILD.gn | 2 +- webrtc/sdk/BUILD.gn | 4 +- webrtc/stats/BUILD.gn | 2 +- webrtc/system_wrappers/BUILD.gn | 12 +++--- webrtc/test/BUILD.gn | 2 +- webrtc/test/fuzzers/BUILD.gn | 2 +- webrtc/tools/BUILD.gn | 10 ++--- webrtc/video/BUILD.gn | 2 +- webrtc/voice_engine/BUILD.gn | 6 +-- 36 files changed, 91 insertions(+), 91 deletions(-) diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index 47b757a237..d4308e12c5 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -287,7 +287,7 @@ if (!is_ios || !build_with_chromium) { } } -rtc_source_set("webrtc_common") { +rtc_static_library("webrtc_common") { sources = [ "common_types.cc", "common_types.h", @@ -313,7 +313,7 @@ if (rtc_enable_protobuf) { } } -rtc_source_set("rtc_event_log") { +rtc_static_library("rtc_event_log") { sources = [ "call/rtc_event_log.cc", "call/rtc_event_log.h", @@ -340,7 +340,7 @@ rtc_source_set("rtc_event_log") { } if (rtc_enable_protobuf) { - rtc_source_set("rtc_event_log_parser") { + rtc_static_library("rtc_event_log_parser") { sources = [ "call/rtc_event_log_parser.cc", "call/rtc_event_log_parser.h", diff --git a/webrtc/api/BUILD.gn b/webrtc/api/BUILD.gn index d58371c20d..6fe43a75dc 100644 --- a/webrtc/api/BUILD.gn +++ b/webrtc/api/BUILD.gn @@ -43,7 +43,7 @@ config("libjingle_peerconnection_warnings_config") { } } -rtc_source_set("libjingle_peerconnection") { +rtc_static_library("libjingle_peerconnection") { cflags = [] sources = [ "audiotrack.cc", @@ -160,7 +160,7 @@ if (is_android && !build_with_chromium) { } } - rtc_source_set("libjingle_peerconnection_jni") { + rtc_static_library("libjingle_peerconnection_jni") { sources = [ "android/jni/androidmediacodeccommon.h", "android/jni/androidmediadecoder_jni.cc", diff --git a/webrtc/audio/BUILD.gn b/webrtc/audio/BUILD.gn index d29ca8a82e..14607cdd73 100644 --- a/webrtc/audio/BUILD.gn +++ b/webrtc/audio/BUILD.gn @@ -8,7 +8,7 @@ import("../build/webrtc.gni") -rtc_source_set("audio") { +rtc_static_library("audio") { sources = [ "audio_receive_stream.cc", "audio_receive_stream.h", diff --git a/webrtc/call/BUILD.gn b/webrtc/call/BUILD.gn index 05a319210a..32bcba3abd 100644 --- a/webrtc/call/BUILD.gn +++ b/webrtc/call/BUILD.gn @@ -8,7 +8,7 @@ import("../build/webrtc.gni") -rtc_source_set("call") { +rtc_static_library("call") { sources = [ "bitrate_allocator.cc", "call.cc", diff --git a/webrtc/common_audio/BUILD.gn b/webrtc/common_audio/BUILD.gn index 08a97b2507..6258fb4552 100644 --- a/webrtc/common_audio/BUILD.gn +++ b/webrtc/common_audio/BUILD.gn @@ -17,7 +17,7 @@ config("common_audio_config") { ] } -rtc_source_set("common_audio") { +rtc_static_library("common_audio") { sources = [ "audio_converter.cc", "audio_converter.h", @@ -186,7 +186,7 @@ rtc_source_set("common_audio") { } if (current_cpu == "x86" || current_cpu == "x64") { - rtc_source_set("common_audio_sse2") { + rtc_static_library("common_audio_sse2") { sources = [ "fir_filter_sse.cc", "resampler/sinc_resampler_sse.cc", @@ -205,7 +205,7 @@ if (current_cpu == "x86" || current_cpu == "x64") { } if (rtc_build_with_neon) { - rtc_source_set("common_audio_neon") { + rtc_static_library("common_audio_neon") { sources = [ "fir_filter_neon.cc", "resampler/sinc_resampler_neon.cc", diff --git a/webrtc/common_video/BUILD.gn b/webrtc/common_video/BUILD.gn index 8b553b2a3c..845a5eb8af 100644 --- a/webrtc/common_video/BUILD.gn +++ b/webrtc/common_video/BUILD.gn @@ -15,7 +15,7 @@ config("common_video_config") { ] } -rtc_source_set("common_video") { +rtc_static_library("common_video") { sources = [ "bitrate_adjuster.cc", "h264/h264_common.cc", diff --git a/webrtc/examples/BUILD.gn b/webrtc/examples/BUILD.gn index ce995221e1..da50bfd14a 100644 --- a/webrtc/examples/BUILD.gn +++ b/webrtc/examples/BUILD.gn @@ -121,7 +121,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { include_dirs = [ "objc/AppRTCDemo/common" ] } - rtc_source_set("apprtc_common") { + rtc_static_library("apprtc_common") { sources = [ "objc/AppRTCDemo/common/ARDUtilities.h", "objc/AppRTCDemo/common/ARDUtilities.m", @@ -154,7 +154,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { } } - rtc_source_set("apprtc_signaling") { + rtc_static_library("apprtc_signaling") { sources = [ "objc/AppRTCDemo/ARDAppClient+Internal.h", "objc/AppRTCDemo/ARDAppClient.h", @@ -270,7 +270,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { } if (is_mac) { - rtc_source_set("AppRTCDemo_app") { + rtc_static_library("AppRTCDemo_app") { sources = [ "objc/AppRTCDemo/mac/APPRTCAppDelegate.h", "objc/AppRTCDemo/mac/APPRTCAppDelegate.m", @@ -338,7 +338,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { } } - rtc_source_set("socketrocket") { + rtc_static_library("socketrocket") { sources = [ "objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h", "objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m", diff --git a/webrtc/libjingle/xmllite/BUILD.gn b/webrtc/libjingle/xmllite/BUILD.gn index 13211ac44d..496d452bd8 100644 --- a/webrtc/libjingle/xmllite/BUILD.gn +++ b/webrtc/libjingle/xmllite/BUILD.gn @@ -14,7 +14,7 @@ group("xmllite") { ] } -rtc_source_set("rtc_xmllite") { +rtc_static_library("rtc_xmllite") { sources = [ "qname.cc", "qname.h", diff --git a/webrtc/libjingle/xmpp/BUILD.gn b/webrtc/libjingle/xmpp/BUILD.gn index 43a39aa7eb..879d67236a 100644 --- a/webrtc/libjingle/xmpp/BUILD.gn +++ b/webrtc/libjingle/xmpp/BUILD.gn @@ -30,7 +30,7 @@ config("xmpp_inherited_config") { ] } -rtc_source_set("rtc_xmpp") { +rtc_static_library("rtc_xmpp") { cflags = [] sources = [ "asyncsocket.h", diff --git a/webrtc/media/BUILD.gn b/webrtc/media/BUILD.gn index e31d7e5d5a..8a4e8088cc 100644 --- a/webrtc/media/BUILD.gn +++ b/webrtc/media/BUILD.gn @@ -42,7 +42,7 @@ if (is_linux && rtc_use_gtk) { } } -rtc_source_set("rtc_media") { +rtc_static_library("rtc_media") { defines = [] libs = [] deps = [] diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn index a69206eaa2..fceff9b0a1 100644 --- a/webrtc/modules/audio_coding/BUILD.gn +++ b/webrtc/modules/audio_coding/BUILD.gn @@ -39,7 +39,7 @@ audio_coding_deps = audio_codec_deps + [ "../../system_wrappers", ] -rtc_source_set("audio_decoder_factory_interface") { +rtc_static_library("audio_decoder_factory_interface") { sources = [ "codecs/audio_decoder_factory.h", "codecs/audio_format.cc", @@ -50,7 +50,7 @@ rtc_source_set("audio_decoder_factory_interface") { ] } -rtc_source_set("builtin_audio_decoder_factory") { +rtc_static_library("builtin_audio_decoder_factory") { sources = [ "codecs/builtin_audio_decoder_factory.cc", "codecs/builtin_audio_decoder_factory.h", @@ -62,7 +62,7 @@ rtc_source_set("builtin_audio_decoder_factory") { defines = audio_codec_defines } -rtc_source_set("rent_a_codec") { +rtc_static_library("rent_a_codec") { sources = [ "acm2/acm_codec_database.cc", "acm2/acm_codec_database.h", @@ -80,7 +80,7 @@ config("audio_coding_config") { ] } -rtc_source_set("audio_coding") { +rtc_static_library("audio_coding") { sources = [ "acm2/acm_common_defs.h", "acm2/acm_receiver.cc", @@ -124,7 +124,7 @@ rtc_source_set("audio_coding") { defines = audio_coding_defines } -rtc_source_set("audio_decoder_interface") { +rtc_static_library("audio_decoder_interface") { sources = [ "codecs/audio_decoder.cc", "codecs/audio_decoder.h", @@ -137,7 +137,7 @@ rtc_source_set("audio_decoder_interface") { ] } -rtc_source_set("audio_encoder_interface") { +rtc_static_library("audio_encoder_interface") { sources = [ "codecs/audio_encoder.cc", "codecs/audio_encoder.h", @@ -155,7 +155,7 @@ config("cng_config") { ] } -rtc_source_set("cng") { +rtc_static_library("cng") { sources = [ "codecs/cng/audio_encoder_cng.cc", "codecs/cng/audio_encoder_cng.h", @@ -175,7 +175,7 @@ config("red_config") { include_dirs = [ "codecs/red" ] } -rtc_source_set("red") { +rtc_static_library("red") { sources = [ "codecs/red/audio_encoder_copy_red.cc", "codecs/red/audio_encoder_copy_red.h", @@ -196,7 +196,7 @@ config("g711_config") { ] } -rtc_source_set("g711") { +rtc_static_library("g711") { sources = [ "codecs/g711/audio_decoder_pcm.cc", "codecs/g711/audio_decoder_pcm.h", @@ -223,7 +223,7 @@ config("g722_config") { ] } -rtc_source_set("g722") { +rtc_static_library("g722") { sources = [ "codecs/g722/audio_decoder_g722.cc", "codecs/g722/audio_decoder_g722.h", @@ -251,7 +251,7 @@ config("ilbc_config") { ] } -rtc_source_set("ilbc") { +rtc_static_library("ilbc") { sources = [ "codecs/ilbc/abs_quant.c", "codecs/ilbc/abs_quant.h", @@ -408,7 +408,7 @@ rtc_source_set("ilbc") { ] } -rtc_source_set("isac_common") { +rtc_static_library("isac_common") { sources = [ "codecs/isac/audio_encoder_isac_t.h", "codecs/isac/audio_encoder_isac_t_impl.h", @@ -424,7 +424,7 @@ config("isac_config") { ] } -rtc_source_set("isac") { +rtc_static_library("isac") { sources = [ "codecs/isac/main/include/audio_decoder_isac.h", "codecs/isac/main/include/audio_encoder_isac.h", @@ -505,7 +505,7 @@ config("isac_fix_config") { ] } -rtc_source_set("isac_fix") { +rtc_static_library("isac_fix") { sources = [ "codecs/isac/fix/include/audio_decoder_isacfix.h", "codecs/isac/fix/include/audio_encoder_isacfix.h", @@ -608,7 +608,7 @@ rtc_source_set("isac_fix") { } if (rtc_build_with_neon) { - rtc_source_set("isac_neon") { + rtc_static_library("isac_neon") { sources = [ "codecs/isac/fix/source/entropy_coding_neon.c", "codecs/isac/fix/source/filterbanks_neon.c", @@ -647,7 +647,7 @@ config("pcm16b_config") { ] } -rtc_source_set("pcm16b") { +rtc_static_library("pcm16b") { sources = [ "codecs/pcm16b/audio_decoder_pcm16b.cc", "codecs/pcm16b/audio_decoder_pcm16b.h", @@ -670,7 +670,7 @@ config("opus_config") { include_dirs = [ "../../.." ] } -rtc_source_set("webrtc_opus") { +rtc_static_library("webrtc_opus") { sources = [ "codecs/opus/audio_decoder_opus.cc", "codecs/opus/audio_decoder_opus.h", @@ -749,7 +749,7 @@ config("neteq_config") { ] } -rtc_source_set("neteq") { +rtc_static_library("neteq") { sources = [ "neteq/accelerate.cc", "neteq/accelerate.h", @@ -1002,7 +1002,7 @@ if (rtc_include_tests) { proto_out_dir = "webrtc/audio_coding/neteq" } - rtc_source_set("rtc_event_log_source") { + rtc_static_library("rtc_event_log_source") { testonly = true sources = [ "neteq/tools/rtc_event_log_source.cc", diff --git a/webrtc/modules/audio_conference_mixer/BUILD.gn b/webrtc/modules/audio_conference_mixer/BUILD.gn index 73446bab86..129ff5b5ec 100644 --- a/webrtc/modules/audio_conference_mixer/BUILD.gn +++ b/webrtc/modules/audio_conference_mixer/BUILD.gn @@ -16,7 +16,7 @@ config("audio_conference_mixer_config") { ] } -rtc_source_set("audio_conference_mixer") { +rtc_static_library("audio_conference_mixer") { sources = [ "include/audio_conference_mixer.h", "include/audio_conference_mixer_defines.h", diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn index 27718760c3..31a02d1053 100644 --- a/webrtc/modules/audio_device/BUILD.gn +++ b/webrtc/modules/audio_device/BUILD.gn @@ -48,7 +48,7 @@ config("audio_device_warnings_config") { } } -rtc_source_set("audio_device") { +rtc_static_library("audio_device") { public_configs = [ ":audio_device_config" ] deps = [ diff --git a/webrtc/modules/audio_mixer/BUILD.gn b/webrtc/modules/audio_mixer/BUILD.gn index c0e5bb5547..40b9f3b9b1 100644 --- a/webrtc/modules/audio_mixer/BUILD.gn +++ b/webrtc/modules/audio_mixer/BUILD.gn @@ -12,7 +12,7 @@ config("audio_conference_mixer_config") { include_dirs = [ "../../modules/include" ] } -rtc_source_set("audio_mixer") { +rtc_static_library("audio_mixer") { sources = [ "audio_frame_manipulator.cc", "audio_frame_manipulator.h", diff --git a/webrtc/modules/audio_processing/BUILD.gn b/webrtc/modules/audio_processing/BUILD.gn index 2387c2e85b..54c33e346c 100644 --- a/webrtc/modules/audio_processing/BUILD.gn +++ b/webrtc/modules/audio_processing/BUILD.gn @@ -17,7 +17,7 @@ declare_args() { aec_untrusted_delay_for_testing = false } -rtc_source_set("audio_processing") { +rtc_static_library("audio_processing") { sources = [ "aec/aec_core.cc", "aec/aec_core.h", @@ -253,7 +253,7 @@ if (rtc_enable_protobuf) { } if (current_cpu == "x86" || current_cpu == "x64") { - rtc_source_set("audio_processing_sse2") { + rtc_static_library("audio_processing_sse2") { sources = [ "aec/aec_core_sse2.cc", "aec/aec_rdft_sse2.cc", @@ -272,7 +272,7 @@ if (current_cpu == "x86" || current_cpu == "x64") { } if (rtc_build_with_neon) { - rtc_source_set("audio_processing_neon") { + rtc_static_library("audio_processing_neon") { sources = [ "aec/aec_core_neon.cc", "aec/aec_rdft_neon.cc", @@ -453,7 +453,7 @@ if (rtc_include_tests) { proto_out_dir = "webrtc/modules/audio_processing" } - rtc_source_set("audioproc_protobuf_utils") { + rtc_static_library("audioproc_protobuf_utils") { sources = [ "test/protobuf_utils.cc", "test/protobuf_utils.h", diff --git a/webrtc/modules/bitrate_controller/BUILD.gn b/webrtc/modules/bitrate_controller/BUILD.gn index 7f10c5d4ea..7bf28e4d73 100644 --- a/webrtc/modules/bitrate_controller/BUILD.gn +++ b/webrtc/modules/bitrate_controller/BUILD.gn @@ -8,7 +8,7 @@ import("../../build/webrtc.gni") -rtc_source_set("bitrate_controller") { +rtc_static_library("bitrate_controller") { sources = [ "bitrate_controller_impl.cc", "bitrate_controller_impl.h", diff --git a/webrtc/modules/congestion_controller/BUILD.gn b/webrtc/modules/congestion_controller/BUILD.gn index a07acc5171..758fba59d8 100644 --- a/webrtc/modules/congestion_controller/BUILD.gn +++ b/webrtc/modules/congestion_controller/BUILD.gn @@ -8,7 +8,7 @@ import("../../build/webrtc.gni") -rtc_source_set("congestion_controller") { +rtc_static_library("congestion_controller") { sources = [ "congestion_controller.cc", "delay_based_bwe.cc", diff --git a/webrtc/modules/desktop_capture/BUILD.gn b/webrtc/modules/desktop_capture/BUILD.gn index 8887ba99c3..46a768aac5 100644 --- a/webrtc/modules/desktop_capture/BUILD.gn +++ b/webrtc/modules/desktop_capture/BUILD.gn @@ -12,7 +12,7 @@ import("../../build/webrtc.gni") use_desktop_capture_differ_sse2 = !is_ios && (current_cpu == "x86" || current_cpu == "x64") -rtc_source_set("primitives") { +rtc_static_library("primitives") { sources = [ "desktop_capture_types.h", "desktop_frame.cc", @@ -24,7 +24,7 @@ rtc_source_set("primitives") { ] } -rtc_source_set("desktop_capture") { +rtc_static_library("desktop_capture") { sources = [ "cropped_desktop_frame.cc", "cropped_desktop_frame.h", @@ -168,7 +168,7 @@ rtc_source_set("desktop_capture") { if (use_desktop_capture_differ_sse2) { # Have to be compiled as a separate target because it needs to be compiled # with SSE2 enabled. - rtc_source_set("desktop_capture_differ_sse2") { + rtc_static_library("desktop_capture_differ_sse2") { visibility = [ ":*" ] sources = [ "differ_vector_sse2.cc", diff --git a/webrtc/modules/media_file/BUILD.gn b/webrtc/modules/media_file/BUILD.gn index 385052cab4..f73c44bcac 100644 --- a/webrtc/modules/media_file/BUILD.gn +++ b/webrtc/modules/media_file/BUILD.gn @@ -12,7 +12,7 @@ config("media_file_config") { visibility = [ ":*" ] # Only targets in this file can depend on this. } -rtc_source_set("media_file") { +rtc_static_library("media_file") { sources = [ "media_file.h", "media_file_defines.h", diff --git a/webrtc/modules/pacing/BUILD.gn b/webrtc/modules/pacing/BUILD.gn index 26ad2b124b..7a16297329 100644 --- a/webrtc/modules/pacing/BUILD.gn +++ b/webrtc/modules/pacing/BUILD.gn @@ -8,7 +8,7 @@ import("../../build/webrtc.gni") -rtc_source_set("pacing") { +rtc_static_library("pacing") { sources = [ "bitrate_prober.cc", "bitrate_prober.h", diff --git a/webrtc/modules/remote_bitrate_estimator/BUILD.gn b/webrtc/modules/remote_bitrate_estimator/BUILD.gn index 1e42ce9aa6..ea0e214bdc 100644 --- a/webrtc/modules/remote_bitrate_estimator/BUILD.gn +++ b/webrtc/modules/remote_bitrate_estimator/BUILD.gn @@ -8,7 +8,7 @@ import("../../build/webrtc.gni") -rtc_source_set("remote_bitrate_estimator") { +rtc_static_library("remote_bitrate_estimator") { sources = [ "aimd_rate_control.cc", "aimd_rate_control.h", @@ -56,7 +56,7 @@ rtc_source_set("remote_bitrate_estimator") { } if (rtc_include_tests) { - rtc_source_set("bwe_simulator") { + rtc_static_library("bwe_simulator") { testonly = true sources = [ "bwe_simulations.cc", diff --git a/webrtc/modules/rtp_rtcp/BUILD.gn b/webrtc/modules/rtp_rtcp/BUILD.gn index e448af07ca..8b9d4b3c4d 100644 --- a/webrtc/modules/rtp_rtcp/BUILD.gn +++ b/webrtc/modules/rtp_rtcp/BUILD.gn @@ -8,7 +8,7 @@ import("../../build/webrtc.gni") -rtc_source_set("rtp_rtcp") { +rtc_static_library("rtp_rtcp") { sources = [ "include/fec_receiver.h", "include/receive_statistics.h", diff --git a/webrtc/modules/utility/BUILD.gn b/webrtc/modules/utility/BUILD.gn index bb51b133be..4d177760bd 100644 --- a/webrtc/modules/utility/BUILD.gn +++ b/webrtc/modules/utility/BUILD.gn @@ -8,7 +8,7 @@ import("../../build/webrtc.gni") -rtc_source_set("utility") { +rtc_static_library("utility") { sources = [ "include/audio_frame_operations.h", "include/file_player.h", diff --git a/webrtc/modules/video_capture/BUILD.gn b/webrtc/modules/video_capture/BUILD.gn index d6e7dce45a..60573ba4b1 100644 --- a/webrtc/modules/video_capture/BUILD.gn +++ b/webrtc/modules/video_capture/BUILD.gn @@ -12,7 +12,7 @@ import("../../build/webrtc.gni") # Targets must link with either 'video_capture' or # 'video_capture_internal_impl' depending on whether they want to # use the internal capturer. -rtc_source_set("video_capture_module") { +rtc_static_library("video_capture_module") { sources = [ "device_info_impl.cc", "device_info_impl.h", @@ -40,7 +40,7 @@ rtc_source_set("video_capture_module") { } } -rtc_source_set("video_capture") { +rtc_static_library("video_capture") { sources = [ "external/device_info_external.cc", "external/video_capture_external.cc", @@ -87,7 +87,7 @@ if (!build_with_chromium) { } } - rtc_source_set("video_capture_internal_impl") { + rtc_static_library("video_capture_internal_impl") { configs += [ ":video_capture_internal_impl_warnings_config" ] deps = [ diff --git a/webrtc/modules/video_coding/BUILD.gn b/webrtc/modules/video_coding/BUILD.gn index 3db9b029ba..d9b392d77a 100644 --- a/webrtc/modules/video_coding/BUILD.gn +++ b/webrtc/modules/video_coding/BUILD.gn @@ -8,7 +8,7 @@ import("../../build/webrtc.gni") -rtc_source_set("video_coding") { +rtc_static_library("video_coding") { sources = [ "codec_database.cc", "codec_database.h", @@ -95,7 +95,7 @@ rtc_source_set("video_coding") { ] } -rtc_source_set("video_coding_utility") { +rtc_static_library("video_coding_utility") { sources = [ "utility/frame_dropper.cc", "utility/frame_dropper.h", @@ -127,7 +127,7 @@ rtc_source_set("video_coding_utility") { ] } -rtc_source_set("webrtc_h264") { +rtc_static_library("webrtc_h264") { sources = [ "codecs/h264/h264.cc", "codecs/h264/include/h264.h", @@ -178,7 +178,7 @@ if (is_ios) { } } - rtc_source_set("webrtc_h264_video_toolbox") { + rtc_static_library("webrtc_h264_video_toolbox") { sources = [ "codecs/h264/h264_video_toolbox_decoder.cc", "codecs/h264/h264_video_toolbox_decoder.h", @@ -223,7 +223,7 @@ if (is_ios) { } } -rtc_source_set("webrtc_i420") { +rtc_static_library("webrtc_i420") { sources = [ "codecs/i420/i420.cc", "codecs/i420/include/i420.h", @@ -240,7 +240,7 @@ rtc_source_set("webrtc_i420") { ] } -rtc_source_set("webrtc_vp8") { +rtc_static_library("webrtc_vp8") { sources = [ "codecs/vp8/default_temporal_layers.cc", "codecs/vp8/default_temporal_layers.h", @@ -278,7 +278,7 @@ rtc_source_set("webrtc_vp8") { } } -rtc_source_set("webrtc_vp9") { +rtc_static_library("webrtc_vp9") { sources = [ "codecs/vp9/include/vp9.h", "codecs/vp9/screenshare_layers.cc", diff --git a/webrtc/modules/video_processing/BUILD.gn b/webrtc/modules/video_processing/BUILD.gn index 2cd6068187..baf2e852e2 100644 --- a/webrtc/modules/video_processing/BUILD.gn +++ b/webrtc/modules/video_processing/BUILD.gn @@ -11,7 +11,7 @@ import("../../build/webrtc.gni") build_video_processing_sse2 = current_cpu == "x86" || current_cpu == "x64" -rtc_source_set("video_processing") { +rtc_static_library("video_processing") { sources = [ "frame_preprocessor.cc", "frame_preprocessor.h", @@ -56,7 +56,7 @@ rtc_source_set("video_processing") { } if (build_video_processing_sse2) { - rtc_source_set("video_processing_sse2") { + rtc_static_library("video_processing_sse2") { sources = [ "util/denoiser_filter_sse2.cc", "util/denoiser_filter_sse2.h", @@ -75,7 +75,7 @@ if (build_video_processing_sse2) { } if (rtc_build_with_neon) { - rtc_source_set("video_processing_neon") { + rtc_static_library("video_processing_neon") { sources = [ "util/denoiser_filter_neon.cc", "util/denoiser_filter_neon.h", diff --git a/webrtc/p2p/BUILD.gn b/webrtc/p2p/BUILD.gn index 8e1f37b3ff..526155cf02 100644 --- a/webrtc/p2p/BUILD.gn +++ b/webrtc/p2p/BUILD.gn @@ -18,7 +18,7 @@ config("rtc_p2p_inherited_config") { defines = [ "FEATURE_ENABLE_VOICEMAIL" ] } -rtc_source_set("rtc_p2p") { +rtc_static_library("rtc_p2p") { sources = [ "base/asyncstuntcpsocket.cc", "base/asyncstuntcpsocket.h", @@ -142,7 +142,7 @@ rtc_source_set("rtc_p2p") { } } -rtc_source_set("libstunprober") { +rtc_static_library("libstunprober") { sources = [ "stunprober/stunprober.cc", ] diff --git a/webrtc/pc/BUILD.gn b/webrtc/pc/BUILD.gn index 94b0d94fc8..42a933fe81 100644 --- a/webrtc/pc/BUILD.gn +++ b/webrtc/pc/BUILD.gn @@ -22,7 +22,7 @@ config("rtc_pc_config") { ] } -rtc_source_set("rtc_pc") { +rtc_static_library("rtc_pc") { defines = [] sources = [ "audiomonitor.cc", diff --git a/webrtc/sdk/BUILD.gn b/webrtc/sdk/BUILD.gn index 70954eee8b..96d8ef7a06 100644 --- a/webrtc/sdk/BUILD.gn +++ b/webrtc/sdk/BUILD.gn @@ -23,7 +23,7 @@ if (is_ios || (is_mac && mac_deployment_target == "10.7")) { ] } - rtc_source_set("rtc_sdk_common_objc") { + rtc_static_library("rtc_sdk_common_objc") { deps = [ "../base:rtc_base", ] @@ -77,7 +77,7 @@ if (is_ios || (is_mac && mac_deployment_target == "10.7")) { } } - rtc_source_set("rtc_sdk_peerconnection_objc") { + rtc_static_library("rtc_sdk_peerconnection_objc") { sources = [ "objc/Framework/Classes/RTCAVFoundationVideoSource+Private.h", "objc/Framework/Classes/RTCAVFoundationVideoSource.mm", diff --git a/webrtc/stats/BUILD.gn b/webrtc/stats/BUILD.gn index a9c9fb8909..896674405a 100644 --- a/webrtc/stats/BUILD.gn +++ b/webrtc/stats/BUILD.gn @@ -15,7 +15,7 @@ group("stats") { } # GYP version: webrtc/stats/stats.gyp:rtc_stats -rtc_source_set("rtc_stats") { +rtc_static_library("rtc_stats") { cflags = [] sources = [ "rtcstats.cc", diff --git a/webrtc/system_wrappers/BUILD.gn b/webrtc/system_wrappers/BUILD.gn index 8087f69df7..4dd85c24fc 100644 --- a/webrtc/system_wrappers/BUILD.gn +++ b/webrtc/system_wrappers/BUILD.gn @@ -12,7 +12,7 @@ if (is_android) { } import("../build/webrtc.gni") -rtc_source_set("system_wrappers") { +rtc_static_library("system_wrappers") { sources = [ "include/aligned_array.h", "include/aligned_malloc.h", @@ -136,21 +136,21 @@ rtc_source_set("system_wrappers") { deps += [ "../base:rtc_base_approved" ] } -rtc_source_set("field_trial_default") { +rtc_static_library("field_trial_default") { sources = [ "include/field_trial_default.h", "source/field_trial_default.cc", ] } -rtc_source_set("metrics_default") { +rtc_static_library("metrics_default") { sources = [ "include/metrics_default.h", "source/metrics_default.cc", ] } -rtc_source_set("system_wrappers_default") { +group("system_wrappers_default") { deps = [ ":field_trial_default", ":metrics_default", @@ -159,7 +159,7 @@ rtc_source_set("system_wrappers_default") { } if (is_android) { - rtc_source_set("cpu_features_android") { + rtc_static_library("cpu_features_android") { sources = [ "source/cpu_features_android.c", ] @@ -171,7 +171,7 @@ if (is_android) { } if (is_linux) { - rtc_source_set("cpu_features_linux") { + rtc_static_library("cpu_features_linux") { sources = [ "source/cpu_features_linux.c", ] diff --git a/webrtc/test/BUILD.gn b/webrtc/test/BUILD.gn index 5ac393df1c..249c78cce4 100644 --- a/webrtc/test/BUILD.gn +++ b/webrtc/test/BUILD.gn @@ -12,7 +12,7 @@ if (is_android) { import("//build/config/android/rules.gni") } -rtc_source_set("test") { +group("test") { testonly = true deps = [ diff --git a/webrtc/test/fuzzers/BUILD.gn b/webrtc/test/fuzzers/BUILD.gn index 0bff7bdd2b..4e5d67125e 100644 --- a/webrtc/test/fuzzers/BUILD.gn +++ b/webrtc/test/fuzzers/BUILD.gn @@ -117,7 +117,7 @@ webrtc_fuzzer_test("congestion_controller_feedback_fuzzer") { ] } -rtc_source_set("audio_decoder_fuzzer") { +rtc_static_library("audio_decoder_fuzzer") { sources = [ "audio_decoder_fuzzer.cc", "audio_decoder_fuzzer.h", diff --git a/webrtc/tools/BUILD.gn b/webrtc/tools/BUILD.gn index dc4fce255c..7d9cd40e01 100644 --- a/webrtc/tools/BUILD.gn +++ b/webrtc/tools/BUILD.gn @@ -9,7 +9,7 @@ import("//third_party/protobuf/proto_library.gni") import("../build/webrtc.gni") -rtc_source_set("tools") { +group("tools") { deps = [ ":command_line_parser", ] @@ -23,7 +23,7 @@ rtc_source_set("tools") { } } -rtc_source_set("command_line_parser") { +rtc_static_library("command_line_parser") { sources = [ "simple_command_line_parser.cc", "simple_command_line_parser.h", @@ -33,7 +33,7 @@ rtc_source_set("command_line_parser") { ] } -rtc_source_set("video_quality_analysis") { +rtc_static_library("video_quality_analysis") { sources = [ "frame_analyzer/video_quality_analysis.cc", "frame_analyzer/video_quality_analysis.h", @@ -85,7 +85,7 @@ rtc_executable("rgba_to_i420_converter") { ] } -rtc_source_set("frame_editing_lib") { +rtc_static_library("frame_editing_lib") { sources = [ "frame_editing/frame_editing_lib.cc", "frame_editing/frame_editing_lib.h", @@ -146,7 +146,7 @@ if (rtc_enable_protobuf) { proto_out_dir = "webrtc/tools/event_log_visualizer" } - rtc_source_set("event_log_visualizer_utils") { + rtc_static_library("event_log_visualizer_utils") { sources = [ "event_log_visualizer/analyzer.cc", "event_log_visualizer/analyzer.h", diff --git a/webrtc/video/BUILD.gn b/webrtc/video/BUILD.gn index b877a24835..14266a63de 100644 --- a/webrtc/video/BUILD.gn +++ b/webrtc/video/BUILD.gn @@ -8,7 +8,7 @@ import("../build/webrtc.gni") -rtc_source_set("video") { +rtc_static_library("video") { sources = [ "call_stats.cc", "call_stats.h", diff --git a/webrtc/voice_engine/BUILD.gn b/webrtc/voice_engine/BUILD.gn index 8a8050b7ee..8ea5328114 100644 --- a/webrtc/voice_engine/BUILD.gn +++ b/webrtc/voice_engine/BUILD.gn @@ -8,7 +8,7 @@ import("../build/webrtc.gni") -rtc_source_set("voice_engine") { +rtc_static_library("voice_engine") { sources = [ "channel.cc", "channel.h", @@ -106,7 +106,7 @@ rtc_source_set("voice_engine") { ] } -rtc_source_set("level_indicator") { +rtc_static_library("level_indicator") { sources = [ "level_indicator.cc", "level_indicator.h", @@ -142,7 +142,7 @@ if (rtc_include_tests) { } } - rtc_source_set("channel_transport") { + rtc_static_library("channel_transport") { testonly = true sources = [ "test/channel_transport/channel_transport.cc",