2017-01-24 06:58:22 -08:00
|
|
|
# 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/config/arm.gni")
|
|
|
|
|
import("//build/config/features.gni")
|
|
|
|
|
import("//build/config/mips.gni")
|
2021-09-20 09:02:01 +03:00
|
|
|
import("//build/config/ozone.gni")
|
2017-01-24 06:58:22 -08:00
|
|
|
import("//build/config/sanitizers/sanitizers.gni")
|
2018-11-13 06:32:23 +01:00
|
|
|
import("//build/config/sysroot.gni")
|
2017-01-24 06:58:22 -08:00
|
|
|
import("//build_overrides/build.gni")
|
2017-03-03 19:41:59 -08:00
|
|
|
|
|
|
|
|
if (!build_with_chromium && is_component_build) {
|
|
|
|
|
print("The Gn argument `is_component_build` is currently " +
|
|
|
|
|
"ignored for WebRTC builds.")
|
|
|
|
|
print("Component builds are supported by Chromium and the argument " +
|
|
|
|
|
"`is_component_build` makes it possible to create shared libraries " +
|
|
|
|
|
"instead of static libraries.")
|
|
|
|
|
print("If an app depends on WebRTC it makes sense to just depend on the " +
|
|
|
|
|
"WebRTC static library, so there is no difference between " +
|
|
|
|
|
"`is_component_build=true` and `is_component_build=false`.")
|
|
|
|
|
print(
|
2021-07-14 14:02:11 +00:00
|
|
|
"More info about component builds at: " + "https://chromium.googlesource.com/chromium/src/+/main/docs/component_build.md")
|
2017-03-03 19:41:59 -08:00
|
|
|
assert(!is_component_build, "Component builds are not supported in WebRTC.")
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-14 04:58:56 -08:00
|
|
|
if (is_ios) {
|
|
|
|
|
import("//build/config/ios/rules.gni")
|
|
|
|
|
}
|
2017-01-24 06:58:22 -08:00
|
|
|
|
2018-09-05 16:29:27 +02:00
|
|
|
if (is_mac) {
|
|
|
|
|
import("//build/config/mac/rules.gni")
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-23 08:38:54 +02:00
|
|
|
if (is_fuchsia) {
|
|
|
|
|
import("//build/config/fuchsia/config.gni")
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-27 13:13:52 +01:00
|
|
|
if (build_with_chromium) {
|
|
|
|
|
import("//media/media_options.gni")
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-30 22:32:55 +02:00
|
|
|
# This declare_args is separated from the next one because args declared
|
|
|
|
|
# in this one, can be read from the next one (args defined in the same
|
|
|
|
|
# declare_args cannot be referenced in that scope).
|
2017-01-24 06:58:22 -08:00
|
|
|
declare_args() {
|
2018-10-10 12:19:02 +02:00
|
|
|
# Setting this to true will make RTC_EXPORT (see rtc_base/system/rtc_export.h)
|
|
|
|
|
# expand to code that will manage symbols visibility.
|
|
|
|
|
rtc_enable_symbol_export = false
|
2021-07-30 22:32:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
declare_args() {
|
2021-10-12 13:23:44 +02:00
|
|
|
# Setting this to true, will make RTC_DLOG() expand to log statements instead
|
2021-10-12 08:55:42 +02:00
|
|
|
# of being removed by the preprocessor.
|
|
|
|
|
# This is useful for example to be able to get RTC_DLOGs on a release build.
|
|
|
|
|
rtc_dlog_always_on = false
|
|
|
|
|
|
2023-03-13 16:01:00 -07:00
|
|
|
# Enables additional build targets that rely on
|
|
|
|
|
# //third_party/google_benchmarks.
|
|
|
|
|
rtc_enable_google_benchmarks = true
|
|
|
|
|
|
2021-07-30 22:32:55 +02:00
|
|
|
# Setting this to true will make RTC_OBJC_EXPORT expand to code that will
|
|
|
|
|
# manage symbols visibility. By default, Obj-C/Obj-C++ symbols are exported
|
|
|
|
|
# if C++ symbols are but setting this arg to true while keeping
|
|
|
|
|
# rtc_enable_symbol_export=false will only export RTC_OBJC_EXPORT
|
|
|
|
|
# annotated symbols.
|
|
|
|
|
rtc_enable_objc_symbol_export = rtc_enable_symbol_export
|
2018-10-10 12:19:02 +02:00
|
|
|
|
2018-08-22 10:37:11 +02:00
|
|
|
# Setting this to true will define WEBRTC_EXCLUDE_FIELD_TRIAL_DEFAULT which
|
2018-08-21 15:44:28 +02:00
|
|
|
# will tell the pre-processor to remove the default definition of symbols
|
|
|
|
|
# needed to use field_trial. In that case a new implementation needs to be
|
|
|
|
|
# provided.
|
2018-08-22 10:37:11 +02:00
|
|
|
if (build_with_chromium) {
|
|
|
|
|
# When WebRTC is built as part of Chromium it should exclude the default
|
|
|
|
|
# implementation of field_trial unless it is building for NACL or
|
|
|
|
|
# Chromecast.
|
2022-06-10 21:33:18 +00:00
|
|
|
rtc_exclude_field_trial_default = !is_nacl && !is_castos && !is_cast_android
|
2018-08-22 10:37:11 +02:00
|
|
|
} else {
|
|
|
|
|
rtc_exclude_field_trial_default = false
|
|
|
|
|
}
|
2018-08-21 15:44:28 +02:00
|
|
|
|
2018-09-05 16:03:16 +02:00
|
|
|
# Setting this to true will define WEBRTC_EXCLUDE_METRICS_DEFAULT which
|
|
|
|
|
# will tell the pre-processor to remove the default definition of symbols
|
|
|
|
|
# needed to use metrics. In that case a new implementation needs to be
|
|
|
|
|
# provided.
|
|
|
|
|
rtc_exclude_metrics_default = build_with_chromium
|
|
|
|
|
|
2021-02-19 16:39:41 +01:00
|
|
|
# Setting this to true will define WEBRTC_EXCLUDE_SYSTEM_TIME which
|
|
|
|
|
# will tell the pre-processor to remove the default definition of the
|
|
|
|
|
# SystemTimeNanos() which is defined in rtc_base/system_time.cc. In
|
|
|
|
|
# that case a new implementation needs to be provided.
|
2021-02-25 10:10:08 +01:00
|
|
|
rtc_exclude_system_time = build_with_chromium
|
2021-02-19 16:39:41 +01:00
|
|
|
|
2018-05-08 13:12:25 -07:00
|
|
|
# Setting this to false will require the API user to pass in their own
|
|
|
|
|
# SSLCertificateVerifier to verify the certificates presented from a
|
|
|
|
|
# TLS-TURN server. In return disabling this saves around 100kb in the binary.
|
|
|
|
|
rtc_builtin_ssl_root_certificates = true
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
# Disable this to avoid building the Opus audio codec.
|
|
|
|
|
rtc_include_opus = true
|
|
|
|
|
|
2017-02-01 17:31:11 -08:00
|
|
|
# Enable this if the Opus version upon which WebRTC is built supports direct
|
|
|
|
|
# encoding of 120 ms packets.
|
2017-07-27 17:45:49 +02:00
|
|
|
rtc_opus_support_120ms_ptime = true
|
2017-02-01 17:31:11 -08:00
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
# Enable this to let the Opus audio codec change complexity on the fly.
|
|
|
|
|
rtc_opus_variable_complexity = false
|
|
|
|
|
|
|
|
|
|
# Used to specify an external Jsoncpp include path when not compiling the
|
|
|
|
|
# library that comes with WebRTC (i.e. rtc_build_json == 0).
|
|
|
|
|
rtc_jsoncpp_root = "//third_party/jsoncpp/source/include"
|
|
|
|
|
|
|
|
|
|
# Used to specify an external OpenSSL include path when not compiling the
|
|
|
|
|
# library that comes with WebRTC (i.e. rtc_build_ssl == 0).
|
|
|
|
|
rtc_ssl_root = ""
|
|
|
|
|
|
|
|
|
|
# Enable when an external authentication mechanism is used for performing
|
|
|
|
|
# packet authentication for RTP packets instead of libsrtp.
|
|
|
|
|
rtc_enable_external_auth = build_with_chromium
|
|
|
|
|
|
|
|
|
|
# Selects whether debug dumps for the audio processing module
|
|
|
|
|
# should be generated.
|
|
|
|
|
apm_debug_dump = false
|
|
|
|
|
|
2020-04-26 23:56:17 +02:00
|
|
|
# Selects whether the audio processing module should be excluded.
|
|
|
|
|
rtc_exclude_audio_processing_module = false
|
|
|
|
|
|
2017-12-07 01:25:53 +01:00
|
|
|
# Set this to false to skip building examples.
|
|
|
|
|
rtc_build_examples = true
|
|
|
|
|
|
|
|
|
|
# Set this to false to skip building tools.
|
|
|
|
|
rtc_build_tools = true
|
|
|
|
|
|
2017-12-20 21:25:47 +01:00
|
|
|
# Set this to false to skip building code that requires X11.
|
2021-09-20 09:02:01 +03:00
|
|
|
rtc_use_x11 = ozone_platform_x11
|
2017-12-20 21:25:47 +01:00
|
|
|
|
2018-11-13 06:32:23 +01:00
|
|
|
# Set this to use PipeWire on the Wayland display server.
|
2018-12-12 14:37:51 +01:00
|
|
|
# By default it's only enabled on desktop Linux (excludes ChromeOS) and
|
|
|
|
|
# only when using the sysroot as PipeWire is not available in older and
|
|
|
|
|
# supported Ubuntu and Debian distributions.
|
2021-09-03 10:07:20 +00:00
|
|
|
rtc_use_pipewire = is_linux && use_sysroot
|
2018-12-12 14:37:51 +01:00
|
|
|
|
2021-09-21 20:36:16 +02:00
|
|
|
# Set this to link PipeWire and required libraries directly instead of using the dlopen.
|
2018-12-12 14:37:51 +01:00
|
|
|
rtc_link_pipewire = false
|
2018-11-13 06:32:23 +01:00
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
# Enable to use the Mozilla internal settings.
|
|
|
|
|
build_with_mozilla = false
|
|
|
|
|
|
2020-09-17 16:13:20 +02:00
|
|
|
# Experimental: enable use of Android AAudio which requires Android SDK 26 or above
|
|
|
|
|
# and NDK r16 or above.
|
2018-03-16 10:09:49 +01:00
|
|
|
rtc_enable_android_aaudio = false
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
# Set to "func", "block", "edge" for coverage generation.
|
|
|
|
|
# At unit test runtime set UBSAN_OPTIONS="coverage=1".
|
|
|
|
|
# It is recommend to set include_examples=0.
|
|
|
|
|
# Use llvm's sancov -html-report for human readable reports.
|
|
|
|
|
# See http://clang.llvm.org/docs/SanitizerCoverage.html .
|
|
|
|
|
rtc_sanitize_coverage = ""
|
|
|
|
|
|
2020-09-11 11:58:18 +02:00
|
|
|
# Selects fixed-point code where possible.
|
|
|
|
|
rtc_prefer_fixed_point = false
|
2017-01-24 06:58:22 -08:00
|
|
|
if (current_cpu == "arm" || current_cpu == "arm64") {
|
|
|
|
|
rtc_prefer_fixed_point = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Determines whether NEON code will be built.
|
|
|
|
|
rtc_build_with_neon =
|
|
|
|
|
(current_cpu == "arm" && arm_use_neon) || current_cpu == "arm64"
|
|
|
|
|
|
2025-02-19 12:36:21 +01:00
|
|
|
# Enable this to build OpenH264 encoder/FFmpeg decoder. When building WebRTC
|
|
|
|
|
# as part of Chromium, this is delegated to `media_use_openh264`. When
|
|
|
|
|
# building WebRTC as a standalone library, this is supported on all platforms
|
|
|
|
|
# except Android and iOS. Because FFmpeg can be built with/without H.264
|
|
|
|
|
# support, `ffmpeg_branding` has to separately be set to a value that
|
|
|
|
|
# includes H.264, for example "Chrome". If FFmpeg is built without H.264,
|
|
|
|
|
# compilation succeeds but `H264DecoderImpl` fails to initialize.
|
2017-01-24 06:58:22 -08:00
|
|
|
# CHECK THE OPENH264, FFMPEG AND H.264 LICENSES/PATENTS BEFORE BUILDING.
|
|
|
|
|
# http://www.openh264.org, https://www.ffmpeg.org/
|
2019-01-15 10:47:18 +01:00
|
|
|
#
|
|
|
|
|
# Enabling H264 when building with MSVC is currently not supported, see
|
|
|
|
|
# bugs.webrtc.org/9213#c13 for more info.
|
2025-02-19 12:36:21 +01:00
|
|
|
if (build_with_chromium) {
|
|
|
|
|
rtc_use_h264 = media_use_openh264
|
|
|
|
|
} else {
|
|
|
|
|
rtc_use_h264 =
|
|
|
|
|
proprietary_codecs && !is_android && !is_ios && !(is_win && !is_clang)
|
|
|
|
|
}
|
2017-01-24 06:58:22 -08:00
|
|
|
|
2024-04-29 16:16:28 +02:00
|
|
|
# Use system OpenH264
|
|
|
|
|
rtc_system_openh264 = false
|
|
|
|
|
|
2023-08-15 17:16:54 +08:00
|
|
|
# Enable to use H265
|
2024-03-27 13:13:52 +01:00
|
|
|
if (build_with_chromium) {
|
|
|
|
|
rtc_use_h265 = enable_hevc_parser_and_hw_decoder
|
|
|
|
|
} else {
|
|
|
|
|
rtc_use_h265 = proprietary_codecs
|
|
|
|
|
}
|
2023-08-15 17:16:54 +08:00
|
|
|
|
2020-06-05 11:47:40 +02:00
|
|
|
# Enable this flag to make webrtc::Mutex be implemented by absl::Mutex.
|
|
|
|
|
rtc_use_absl_mutex = false
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
# By default, use normal platform audio support or dummy audio, but don't
|
|
|
|
|
# use file-based audio playout and record.
|
|
|
|
|
rtc_use_dummy_audio_file_devices = false
|
|
|
|
|
|
2017-06-13 17:34:16 +02:00
|
|
|
# When set to true, replace the audio output with a sinus tone at 440Hz.
|
|
|
|
|
# The ADM will ask for audio data from WebRTC but instead of reading real
|
|
|
|
|
# audio samples from NetEQ, a sinus tone will be generated and replace the
|
|
|
|
|
# real audio samples.
|
|
|
|
|
rtc_audio_device_plays_sinus_tone = false
|
|
|
|
|
|
2018-06-04 10:24:37 +02:00
|
|
|
if (is_ios) {
|
|
|
|
|
# Build broadcast extension in AppRTCMobile for iOS. This results in the
|
|
|
|
|
# binary only running on iOS 11+, which is why it is disabled by default.
|
|
|
|
|
rtc_apprtcmobile_broadcast_extension = false
|
|
|
|
|
}
|
2018-08-30 09:30:29 +02:00
|
|
|
|
2023-06-28 14:32:04 +02:00
|
|
|
# Determines whether OpenGL is available on iOS.
|
|
|
|
|
rtc_ios_use_opengl_rendering = is_ios && target_environment != "catalyst"
|
2021-07-06 12:16:41 -07:00
|
|
|
|
2019-02-12 11:36:13 -08:00
|
|
|
# When set to false, builtin audio encoder/decoder factories and all the
|
|
|
|
|
# audio codecs they depend on will not be included in libwebrtc.{a|lib}
|
|
|
|
|
# (they will still be included in libjingle_peerconnection_so.so and
|
|
|
|
|
# WebRTC.framework)
|
|
|
|
|
rtc_include_builtin_audio_codecs = true
|
|
|
|
|
|
2019-03-28 07:50:07 +01:00
|
|
|
# When set to true and in a standalone build, it will undefine UNICODE and
|
|
|
|
|
# _UNICODE (which are always defined globally by the Chromium Windows
|
|
|
|
|
# toolchain).
|
|
|
|
|
# This is only needed for testing purposes, WebRTC wants to be sure it
|
|
|
|
|
# doesn't assume /DUNICODE and /D_UNICODE but that it explicitly uses
|
|
|
|
|
# wide character functions.
|
|
|
|
|
rtc_win_undef_unicode = false
|
2020-10-01 13:47:54 -07:00
|
|
|
|
|
|
|
|
# When set to true, a capturer implementation that uses the
|
2021-04-22 13:22:25 -07:00
|
|
|
# Windows.Graphics.Capture APIs will be available for use. This introduces a
|
|
|
|
|
# dependency on the Win 10 SDK v10.0.17763.0.
|
2021-04-23 12:37:26 -07:00
|
|
|
rtc_enable_win_wgc = is_win
|
2021-11-23 11:00:24 +01:00
|
|
|
|
|
|
|
|
# Includes the dav1d decoder in the internal decoder factory when set to true.
|
|
|
|
|
rtc_include_dav1d_in_internal_decoder_factory = true
|
2022-09-21 15:20:22 +02:00
|
|
|
|
2023-02-28 13:57:01 +01:00
|
|
|
# When enabled, a run-time check will make sure that all field trial keys have
|
|
|
|
|
# been registered in accordance with the field trial policy, see
|
|
|
|
|
# g3doc/field-trials.md. The value can be set to the following:
|
|
|
|
|
#
|
|
|
|
|
# "dcheck": RTC_DCHECKs that the field trial has been registered. RTC_DCHECK
|
|
|
|
|
# must be enabled separately.
|
|
|
|
|
#
|
|
|
|
|
# "warn": RTC_LOGs a message with LS_WARNING severity if the field trial
|
|
|
|
|
# hasn't been registered.
|
|
|
|
|
rtc_strict_field_trials = ""
|
2023-07-26 13:01:43 +02:00
|
|
|
|
|
|
|
|
# If different from "", symbols exported with RTC_OBJC_EXPORT will be prefixed
|
|
|
|
|
# with this string.
|
|
|
|
|
# See the definition of RTC_OBJC_TYPE_PREFIX in the code.
|
|
|
|
|
rtc_objc_prefix = ""
|
2023-08-22 09:55:36 +00:00
|
|
|
|
|
|
|
|
# Embedders can define dependencies needed by WebRTC. Dependencies can be
|
|
|
|
|
# configs or targets. This can be defined in their `.gn` file.
|
|
|
|
|
#
|
|
|
|
|
# In practise, this is use by Chromium: Targets from
|
|
|
|
|
# `//third_party/webrtc_overrides` are depending on Chrome's `//base`, but
|
|
|
|
|
# WebRTC does not declare its public dependencies. See webrtc:8603. Instead
|
|
|
|
|
# WebRTC is using a global common dependencies.
|
|
|
|
|
rtc_common_public_deps = [] # no-presubmit-check TODO(webrtc:8603)
|
2024-04-24 13:27:00 +00:00
|
|
|
|
|
|
|
|
# When true, include the Perfetto library.
|
|
|
|
|
rtc_use_perfetto = false
|
2018-01-15 10:20:00 -05:00
|
|
|
}
|
2017-01-24 06:58:22 -08:00
|
|
|
|
2018-01-15 10:20:00 -05:00
|
|
|
if (!build_with_mozilla) {
|
|
|
|
|
import("//testing/test.gni")
|
2017-01-24 06:58:22 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# A second declare_args block, so that declarations within it can
|
|
|
|
|
# depend on the possibly overridden variables in the first
|
|
|
|
|
# declare_args block.
|
|
|
|
|
declare_args() {
|
2018-01-15 10:20:00 -05:00
|
|
|
# Enables the use of protocol buffers for debug recordings.
|
|
|
|
|
rtc_enable_protobuf = !build_with_mozilla
|
|
|
|
|
|
|
|
|
|
# Set this to disable building with support for SCTP data channels.
|
|
|
|
|
rtc_enable_sctp = !build_with_mozilla
|
|
|
|
|
|
|
|
|
|
# Disable these to not build components which can be externally provided.
|
|
|
|
|
rtc_build_json = !build_with_mozilla
|
|
|
|
|
rtc_build_libsrtp = !build_with_mozilla
|
|
|
|
|
rtc_build_libvpx = !build_with_mozilla
|
|
|
|
|
rtc_libvpx_build_vp9 = !build_with_mozilla
|
|
|
|
|
rtc_build_opus = !build_with_mozilla
|
|
|
|
|
rtc_build_ssl = !build_with_mozilla
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
# Excluded in Chromium since its prerequisites don't require Pulse Audio.
|
|
|
|
|
rtc_include_pulse_audio = !build_with_chromium
|
|
|
|
|
|
|
|
|
|
# Chromium uses its own IO handling, so the internal ADM is only built for
|
|
|
|
|
# standalone WebRTC.
|
|
|
|
|
rtc_include_internal_audio_device = !build_with_chromium
|
|
|
|
|
|
2020-08-17 17:13:41 +08:00
|
|
|
# Set this to true to enable the avx2 support in webrtc.
|
2020-09-25 12:02:32 +02:00
|
|
|
# TODO: Make sure that AVX2 works also for non-clang compilers.
|
|
|
|
|
if (is_clang == true) {
|
|
|
|
|
rtc_enable_avx2 = true
|
|
|
|
|
} else {
|
|
|
|
|
rtc_enable_avx2 = false
|
|
|
|
|
}
|
2020-08-17 17:13:41 +08:00
|
|
|
|
2021-03-02 21:23:24 +01:00
|
|
|
# Set this to true to build the unit tests.
|
|
|
|
|
# Disabled when building with Chromium or Mozilla.
|
2018-01-15 10:20:00 -05:00
|
|
|
rtc_include_tests = !build_with_chromium && !build_with_mozilla
|
2019-06-07 13:27:07 +02:00
|
|
|
|
|
|
|
|
# Set this to false to skip building code that also requires X11 extensions
|
|
|
|
|
# such as Xdamage, Xfixes.
|
|
|
|
|
rtc_use_x11_extensions = rtc_use_x11
|
2019-11-26 16:24:46 +01:00
|
|
|
|
|
|
|
|
# Set this to true to fully remove logging from WebRTC.
|
|
|
|
|
rtc_disable_logging = false
|
2019-11-28 14:24:31 +01:00
|
|
|
|
|
|
|
|
# Set this to true to disable trace events.
|
|
|
|
|
rtc_disable_trace_events = false
|
2019-11-28 17:09:30 +01:00
|
|
|
|
|
|
|
|
# Set this to true to disable detailed error message and logging for
|
|
|
|
|
# RTC_CHECKs.
|
|
|
|
|
rtc_disable_check_msg = false
|
2019-12-09 13:06:53 +01:00
|
|
|
|
|
|
|
|
# Set this to true to disable webrtc metrics.
|
2019-12-10 15:02:53 +01:00
|
|
|
rtc_disable_metrics = false
|
2017-01-24 06:58:22 -08:00
|
|
|
}
|
|
|
|
|
|
2021-04-15 15:02:56 +02:00
|
|
|
declare_args() {
|
2021-05-06 10:50:07 +02:00
|
|
|
# Enable the dcsctp backend for DataChannels and related unittests
|
|
|
|
|
rtc_build_dcsctp = !build_with_mozilla && rtc_enable_sctp
|
|
|
|
|
|
2022-03-15 16:01:52 +01:00
|
|
|
# Enable gRPC used for negotiation in multiprocess tests
|
|
|
|
|
rtc_enable_grpc = rtc_enable_protobuf && (is_linux || is_mac)
|
2021-04-15 15:02:56 +02:00
|
|
|
}
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
# Make it possible to provide custom locations for some libraries (move these
|
|
|
|
|
# up into declare_args should we need to actually use them for the GN build).
|
|
|
|
|
rtc_libvpx_dir = "//third_party/libvpx"
|
|
|
|
|
rtc_opus_dir = "//third_party/opus"
|
|
|
|
|
|
|
|
|
|
# Desktop capturer is supported only on Windows, OSX and Linux.
|
2019-06-07 13:27:07 +02:00
|
|
|
rtc_desktop_capture_supported =
|
|
|
|
|
(is_win && current_os != "winuwp") || is_mac ||
|
2020-09-10 18:10:11 +09:00
|
|
|
((is_linux || is_chromeos) && (rtc_use_x11_extensions || rtc_use_pipewire))
|
2017-01-24 06:58:22 -08:00
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
# Templates
|
|
|
|
|
#
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
# Points to // in webrtc stand-alone or to //third_party/webrtc/ in
|
2017-01-24 06:58:22 -08:00
|
|
|
# chromium.
|
|
|
|
|
# We need absolute paths for all configs in templates as they are shared in
|
|
|
|
|
# different subdirectories.
|
|
|
|
|
webrtc_root = get_path_info(".", "abspath")
|
|
|
|
|
|
|
|
|
|
# Global configuration that should be applied to all WebRTC targets.
|
|
|
|
|
# You normally shouldn't need to include this in your target as it's
|
|
|
|
|
# automatically included when using the rtc_* templates.
|
|
|
|
|
# It sets defines, include paths and compilation warnings accordingly,
|
|
|
|
|
# both for WebRTC stand-alone builds and for the scenario when WebRTC
|
|
|
|
|
# native code is built as part of Chromium.
|
2021-07-30 22:32:55 +02:00
|
|
|
rtc_common_configs = [ webrtc_root + ":common_config" ]
|
2017-01-24 06:58:22 -08:00
|
|
|
|
2017-04-24 00:57:16 -07:00
|
|
|
if (is_mac || is_ios) {
|
2023-08-02 07:41:23 +00:00
|
|
|
if (filter_include(default_compiler_configs,
|
|
|
|
|
[ "//build/config/compiler:enable_arc" ]) == []) {
|
|
|
|
|
rtc_common_configs += [ "//build/config/compiler:enable_arc" ]
|
|
|
|
|
}
|
2017-04-24 00:57:16 -07:00
|
|
|
}
|
2024-04-29 11:36:58 +00:00
|
|
|
|
2024-05-02 11:59:39 +00:00
|
|
|
if (build_with_chromium) {
|
2024-04-29 11:36:58 +00:00
|
|
|
rtc_use_perfetto = true
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
# Global public configuration that should be applied to all WebRTC targets. You
|
|
|
|
|
# normally shouldn't need to include this in your target as it's automatically
|
|
|
|
|
# included when using the rtc_* templates. It set the defines, include paths and
|
|
|
|
|
# compilation warnings that should be propagated to dependents of the targets
|
|
|
|
|
# depending on the target having this config.
|
|
|
|
|
rtc_common_inherited_config = webrtc_root + ":common_inherited_config"
|
|
|
|
|
|
|
|
|
|
# Common configs to remove or add in all rtc targets.
|
|
|
|
|
rtc_remove_configs = []
|
2019-03-01 10:32:56 +01:00
|
|
|
if (!build_with_chromium && is_clang) {
|
|
|
|
|
rtc_remove_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
|
|
|
}
|
2017-01-24 06:58:22 -08:00
|
|
|
rtc_add_configs = rtc_common_configs
|
2018-09-06 13:45:44 +02:00
|
|
|
rtc_prod_configs = [ webrtc_root + ":rtc_prod_config" ]
|
2018-09-18 13:15:54 +02:00
|
|
|
rtc_library_impl_config = [ webrtc_root + ":library_impl_config" ]
|
2017-01-24 06:58:22 -08:00
|
|
|
|
|
|
|
|
set_defaults("rtc_test") {
|
|
|
|
|
configs = rtc_add_configs
|
2023-08-22 09:55:36 +00:00
|
|
|
public_deps = rtc_common_public_deps # no-presubmit-check TODO(webrtc:8603)
|
2017-01-24 06:58:22 -08:00
|
|
|
suppressed_configs = []
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
set_defaults("rtc_library") {
|
2017-01-24 06:58:22 -08:00
|
|
|
configs = rtc_add_configs
|
2023-08-22 09:55:36 +00:00
|
|
|
public_deps = rtc_common_public_deps # no-presubmit-check TODO(webrtc:8603)
|
2017-01-24 06:58:22 -08:00
|
|
|
suppressed_configs = []
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
set_defaults("rtc_source_set") {
|
2017-01-24 06:58:22 -08:00
|
|
|
configs = rtc_add_configs
|
2023-08-22 09:55:36 +00:00
|
|
|
public_deps = rtc_common_public_deps # no-presubmit-check TODO(webrtc:8603)
|
2017-01-24 06:58:22 -08:00
|
|
|
suppressed_configs = []
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set_defaults("rtc_static_library") {
|
|
|
|
|
configs = rtc_add_configs
|
2023-08-22 09:55:36 +00:00
|
|
|
public_deps = rtc_common_public_deps # no-presubmit-check TODO(webrtc:8603)
|
2017-01-24 06:58:22 -08:00
|
|
|
suppressed_configs = []
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
set_defaults("rtc_executable") {
|
|
|
|
|
configs = rtc_add_configs
|
2023-08-22 09:55:36 +00:00
|
|
|
public_deps = rtc_common_public_deps # no-presubmit-check TODO(webrtc:8603)
|
2019-10-17 21:32:04 +02:00
|
|
|
suppressed_configs = []
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
set_defaults("rtc_shared_library") {
|
|
|
|
|
configs = rtc_add_configs
|
2023-08-22 09:55:36 +00:00
|
|
|
public_deps = rtc_common_public_deps # no-presubmit-check TODO(webrtc:8603)
|
2017-01-24 06:58:22 -08:00
|
|
|
suppressed_configs = []
|
|
|
|
|
}
|
|
|
|
|
|
2018-01-10 15:54:53 +00:00
|
|
|
webrtc_default_visibility = [ webrtc_root + "/*" ]
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
|
# Allow Chromium's WebRTC overrides targets to bypass the regular
|
|
|
|
|
# visibility restrictions.
|
|
|
|
|
webrtc_default_visibility += [ webrtc_root + "/../webrtc_overrides/*" ]
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-22 19:55:00 +02:00
|
|
|
# ---- Poisons ----
|
|
|
|
|
#
|
|
|
|
|
# The general idea is that some targets declare that they contain some
|
|
|
|
|
# kind of poison, which makes it impossible for other targets to
|
|
|
|
|
# depend on them (even transitively) unless they declare themselves
|
|
|
|
|
# immune to that particular type of poison.
|
|
|
|
|
#
|
|
|
|
|
# Targets that *contain* poison of type foo should contain the line
|
|
|
|
|
#
|
|
|
|
|
# poisonous = [ "foo" ]
|
|
|
|
|
#
|
|
|
|
|
# and targets that *are immune but arent't themselves poisonous*
|
|
|
|
|
# should contain
|
|
|
|
|
#
|
|
|
|
|
# allow_poison = [ "foo" ]
|
|
|
|
|
#
|
|
|
|
|
# This useful in cases where we have some large target or set of
|
|
|
|
|
# targets and want to ensure that most other targets do not
|
|
|
|
|
# transitively depend on them. For example, almost no high-level
|
|
|
|
|
# target should depend on the audio codecs, since we want WebRTC users
|
|
|
|
|
# to be able to inject any subset of them and actually end up with a
|
|
|
|
|
# binary that doesn't include the codecs they didn't inject.
|
|
|
|
|
#
|
|
|
|
|
# Test-only targets (`testonly` set to true) and non-public targets
|
|
|
|
|
# (`visibility` not containing "*") are automatically immune to all
|
|
|
|
|
# types of poison.
|
|
|
|
|
#
|
|
|
|
|
# Here's the complete list of all types of poison. It must be kept in
|
|
|
|
|
# 1:1 correspondence with the set of //:poison_* targets.
|
|
|
|
|
#
|
|
|
|
|
all_poison_types = [
|
|
|
|
|
# Encoders and decoders for specific audio codecs such as Opus and iSAC.
|
|
|
|
|
"audio_codecs",
|
2018-04-24 16:39:05 +02:00
|
|
|
|
2021-12-06 15:40:04 +01:00
|
|
|
# Default echo detector implementation.
|
|
|
|
|
"default_echo_detector",
|
|
|
|
|
|
2023-11-27 10:57:22 +01:00
|
|
|
# Implementations of the utilities exposed through `Environment`.
|
|
|
|
|
# Most webrtc classes must use propagated `Environment`. Only few top-level
|
|
|
|
|
# classes are allowed to create `Environment` from individual utilities.
|
|
|
|
|
"environment_construction",
|
|
|
|
|
|
2019-10-25 10:45:58 +02:00
|
|
|
# Software video codecs (VP8 and VP9 through libvpx).
|
|
|
|
|
"software_video_codecs",
|
2018-04-22 19:55:00 +02:00
|
|
|
]
|
|
|
|
|
|
Reland "Reland "Adding absl includes and defines to rtc_* templates.""
This reverts commit 759eb4f2ad7e23b65fe0b834f8ba7f580bf1a933.
Reason for revert:
The problem has been fixed in https://chromium-review.googlesource.com/1075889.
Original change's description:
> Revert "Reland "Adding absl includes and defines to rtc_* templates.""
>
> This reverts commit fae51e4c95780f59f4bedf6e01403ff86152e168.
>
> Reason for revert:
> When use_xcode_clang = true we get:
> error: unknown warning option '-Wno-unused-template'; did you mean '-Wno-unused-result'? [-Werror,-Wunknown-warning-option]
> error: unknown warning option '-Wno-zero-as-null-pointer-constant'; did you mean '-Wno-int-to-void-pointer-cast'? [-Werror,-Wunknown-warning-option]
>
>
> Original change's description:
> > Reland "Adding absl includes and defines to rtc_* templates."
> >
> > This reverts commit 8436a699a998e4fa30d97786142baad08f110d2a.
> >
> > Reason for revert:
> > New absl roll -> https://chromium-review.googlesource.com/1071468
> >
> > Original change's description:
> > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > >
> > > This reverts commit bdb0fe42bc46d190ca45fc5a6658eddbfa5eead5.
> > >
> > > Reason for revert: https://ci.chromium.org/buildbot/chromium.fyi/Jumbo%20Win%20x64/11502
> > >
> > > Original change's description:
> > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > >
> > > > This reverts commit 85cb19fec7caf558dee7a09aafabe01c5ac78f3f.
> > > >
> > > > Reason for revert: The new version of Abseil should fix the previous
> > > > issue.
> > > >
> > > > Original change's description:
> > > > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > > > >
> > > > > This reverts commit 9632112a16d70a146e917db4de761e6253dfc364.
> > > > >
> > > > > Reason for revert: It breaks the WebRTC roll into Chromium.
> > > > > https://chromium-review.googlesource.com/c/chromium/src/+/1061476
> > > > >
> > > > > Original change's description:
> > > > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > > > >
> > > > > > This reverts commit d161eda477491b2b97fb3f26d229c625a2a0e9b8.
> > > > > >
> > > > > > Reason for revert: The problem with iOS trybots should be fixed.
> > > > > >
> > > > > > Original change's description:
> > > > > > > Revert "Adding absl includes and defines to rtc_* templates."
> > > > > > >
> > > > > > > This reverts commit 9d8f3850f4c4faad5dc5ab32ab6f2c9c43df7b6c.
> > > > > > >
> > > > > > > Reason for revert: Breaks some trybots: https://build.chromium.org/p/client.webrtc/builders/iOS64%20Release/builds/12793.
> > > > > > >
> > > > > > > Original change's description:
> > > > > > > > Adding absl includes and defines to rtc_* templates.
> > > > > > > >
> > > > > > > > This CL implicitly adds the -I compiler flag and absl macros to WebRTC
> > > > > > > > templates. In order to include absl headers using relative paths, WebRTC
> > > > > > > > needs to ensure that all its build targets are able to see absl headers.
> > > > > > > >
> > > > > > > > This can also be done with public_deps, but WebRTC is trying to avoid
> > > > > > > > it because it creates problems with other build systems. Given this
> > > > > > > > constraint, using rtc_* templates is the most reliable solution.
> > > > > > > >
> > > > > > > > Please note that rtc_* templates are adding absl includes and defines
> > > > > > > > as public_configs, this means that build targets with WebRTC targets
> > > > > > > > in their public_deps will propagate these configs following the GN
> > > > > > > > guideline.
> > > > > > > >
> > > > > > > > Bug: webrtc:8821
> > > > > > > > Change-Id: I4aa594a524f4bd045bcb3e80d76cc27f06fe01d7
> > > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/70367
> > > > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > > Cr-Commit-Position: refs/heads/master@{#22927}
> > > > > > >
> > > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > > >
> > > > > > > Change-Id: Id8e1f881c57553386566eb1970f6b9f8632cab37
> > > > > > > No-Presubmit: true
> > > > > > > No-Tree-Checks: true
> > > > > > > No-Try: true
> > > > > > > Bug: webrtc:8821
> > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71000
> > > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Cr-Commit-Position: refs/heads/master@{#22928}
> > > > > >
> > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > >
> > > > > > Bug: webrtc:8821
> > > > > > Change-Id: I6ee2eda97bbcd4c9be25c9c4073272192b0373f8
> > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71700
> > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Cr-Commit-Position: refs/heads/master@{#23251}
> > > > >
> > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > >
> > > > > Change-Id: I61fb749797314ca514691b341c66f7f39ef45491
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: webrtc:8821
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/77220
> > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#23264}
> > > >
> > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > >
> > > > # Not skipping CQ checks because original CL landed > 1 day ago.
> > > >
> > > > Bug: webrtc:8821
> > > > Change-Id: I71dea953a002a0d526949c627653bcad0c6518fc
> > > > Reviewed-on: https://webrtc-review.googlesource.com/77781
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#23317}
> > >
> > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > >
> > > Change-Id: I6010f9264dba7bcc4e82c4f4bbfb2eca561e500e
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:8821, chromium:845158
> > > Reviewed-on: https://webrtc-review.googlesource.com/78061
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#23328}
> >
> > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:8821, chromium:845158
> > Change-Id: Iebe0958012c39e1321487e5425f43904eaf5fe91
> > Reviewed-on: https://webrtc-review.googlesource.com/78705
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23403}
>
> TBR=phoglund@webrtc.org,mbonadei@webrtc.org
>
> Change-Id: I8285cf59402aa6862ea7e3ec21f885360b7050fb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8821, chromium:845158
> Reviewed-on: https://webrtc-review.googlesource.com/79420
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23416}
TBR=phoglund@webrtc.org,mbonadei@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8821, chromium:845158
Change-Id: I18ffdb0d7be61daf0b6464c68d219aa352f42dde
Reviewed-on: https://webrtc-review.googlesource.com/79582
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23435}
2018-05-29 14:22:32 +00:00
|
|
|
absl_include_config = "//third_party/abseil-cpp:absl_include_config"
|
|
|
|
|
absl_define_config = "//third_party/abseil-cpp:absl_define_config"
|
|
|
|
|
|
2019-07-18 13:44:12 +02:00
|
|
|
# Abseil Flags are testonly, so this config will only be applied to WebRTC targets
|
|
|
|
|
# that are testonly.
|
|
|
|
|
absl_flags_config = webrtc_root + ":absl_flags_configs"
|
|
|
|
|
|
2020-11-25 16:41:37 +01:00
|
|
|
# WebRTC wrapper of Chromium's test() template. This template just adds some
|
|
|
|
|
# WebRTC only configuration in order to avoid to duplicate it for every WebRTC
|
|
|
|
|
# target.
|
|
|
|
|
# The parameter `is_xctest` is different from the one in the Chromium's test()
|
|
|
|
|
# template (and it is not forwarded to it). In rtc_test(), the argument
|
|
|
|
|
# `is_xctest` is used to avoid to take dependencies that are not needed
|
|
|
|
|
# in case the test is a real XCTest (using the XCTest framework).
|
2017-01-24 06:58:22 -08:00
|
|
|
template("rtc_test") {
|
|
|
|
|
test(target_name) {
|
|
|
|
|
forward_variables_from(invoker,
|
|
|
|
|
"*",
|
|
|
|
|
[
|
|
|
|
|
"configs",
|
2020-11-25 16:41:37 +01:00
|
|
|
"is_xctest",
|
2017-01-24 06:58:22 -08:00
|
|
|
"public_configs",
|
|
|
|
|
"suppressed_configs",
|
2017-10-16 11:16:19 +02:00
|
|
|
"visibility",
|
2017-01-24 06:58:22 -08:00
|
|
|
])
|
2017-11-21 15:35:27 +01:00
|
|
|
|
|
|
|
|
# Always override to public because when target_os is Android the `test`
|
|
|
|
|
# template can override it to [ "*" ] and we want to avoid conditional
|
|
|
|
|
# visibility.
|
2017-11-21 12:47:34 +01:00
|
|
|
visibility = [ "*" ]
|
2017-01-24 06:58:22 -08:00
|
|
|
configs += invoker.configs
|
|
|
|
|
configs -= rtc_remove_configs
|
|
|
|
|
configs -= invoker.suppressed_configs
|
Reland "Reland "Adding absl includes and defines to rtc_* templates.""
This reverts commit 759eb4f2ad7e23b65fe0b834f8ba7f580bf1a933.
Reason for revert:
The problem has been fixed in https://chromium-review.googlesource.com/1075889.
Original change's description:
> Revert "Reland "Adding absl includes and defines to rtc_* templates.""
>
> This reverts commit fae51e4c95780f59f4bedf6e01403ff86152e168.
>
> Reason for revert:
> When use_xcode_clang = true we get:
> error: unknown warning option '-Wno-unused-template'; did you mean '-Wno-unused-result'? [-Werror,-Wunknown-warning-option]
> error: unknown warning option '-Wno-zero-as-null-pointer-constant'; did you mean '-Wno-int-to-void-pointer-cast'? [-Werror,-Wunknown-warning-option]
>
>
> Original change's description:
> > Reland "Adding absl includes and defines to rtc_* templates."
> >
> > This reverts commit 8436a699a998e4fa30d97786142baad08f110d2a.
> >
> > Reason for revert:
> > New absl roll -> https://chromium-review.googlesource.com/1071468
> >
> > Original change's description:
> > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > >
> > > This reverts commit bdb0fe42bc46d190ca45fc5a6658eddbfa5eead5.
> > >
> > > Reason for revert: https://ci.chromium.org/buildbot/chromium.fyi/Jumbo%20Win%20x64/11502
> > >
> > > Original change's description:
> > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > >
> > > > This reverts commit 85cb19fec7caf558dee7a09aafabe01c5ac78f3f.
> > > >
> > > > Reason for revert: The new version of Abseil should fix the previous
> > > > issue.
> > > >
> > > > Original change's description:
> > > > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > > > >
> > > > > This reverts commit 9632112a16d70a146e917db4de761e6253dfc364.
> > > > >
> > > > > Reason for revert: It breaks the WebRTC roll into Chromium.
> > > > > https://chromium-review.googlesource.com/c/chromium/src/+/1061476
> > > > >
> > > > > Original change's description:
> > > > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > > > >
> > > > > > This reverts commit d161eda477491b2b97fb3f26d229c625a2a0e9b8.
> > > > > >
> > > > > > Reason for revert: The problem with iOS trybots should be fixed.
> > > > > >
> > > > > > Original change's description:
> > > > > > > Revert "Adding absl includes and defines to rtc_* templates."
> > > > > > >
> > > > > > > This reverts commit 9d8f3850f4c4faad5dc5ab32ab6f2c9c43df7b6c.
> > > > > > >
> > > > > > > Reason for revert: Breaks some trybots: https://build.chromium.org/p/client.webrtc/builders/iOS64%20Release/builds/12793.
> > > > > > >
> > > > > > > Original change's description:
> > > > > > > > Adding absl includes and defines to rtc_* templates.
> > > > > > > >
> > > > > > > > This CL implicitly adds the -I compiler flag and absl macros to WebRTC
> > > > > > > > templates. In order to include absl headers using relative paths, WebRTC
> > > > > > > > needs to ensure that all its build targets are able to see absl headers.
> > > > > > > >
> > > > > > > > This can also be done with public_deps, but WebRTC is trying to avoid
> > > > > > > > it because it creates problems with other build systems. Given this
> > > > > > > > constraint, using rtc_* templates is the most reliable solution.
> > > > > > > >
> > > > > > > > Please note that rtc_* templates are adding absl includes and defines
> > > > > > > > as public_configs, this means that build targets with WebRTC targets
> > > > > > > > in their public_deps will propagate these configs following the GN
> > > > > > > > guideline.
> > > > > > > >
> > > > > > > > Bug: webrtc:8821
> > > > > > > > Change-Id: I4aa594a524f4bd045bcb3e80d76cc27f06fe01d7
> > > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/70367
> > > > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > > Cr-Commit-Position: refs/heads/master@{#22927}
> > > > > > >
> > > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > > >
> > > > > > > Change-Id: Id8e1f881c57553386566eb1970f6b9f8632cab37
> > > > > > > No-Presubmit: true
> > > > > > > No-Tree-Checks: true
> > > > > > > No-Try: true
> > > > > > > Bug: webrtc:8821
> > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71000
> > > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Cr-Commit-Position: refs/heads/master@{#22928}
> > > > > >
> > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > >
> > > > > > Bug: webrtc:8821
> > > > > > Change-Id: I6ee2eda97bbcd4c9be25c9c4073272192b0373f8
> > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71700
> > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Cr-Commit-Position: refs/heads/master@{#23251}
> > > > >
> > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > >
> > > > > Change-Id: I61fb749797314ca514691b341c66f7f39ef45491
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: webrtc:8821
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/77220
> > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#23264}
> > > >
> > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > >
> > > > # Not skipping CQ checks because original CL landed > 1 day ago.
> > > >
> > > > Bug: webrtc:8821
> > > > Change-Id: I71dea953a002a0d526949c627653bcad0c6518fc
> > > > Reviewed-on: https://webrtc-review.googlesource.com/77781
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#23317}
> > >
> > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > >
> > > Change-Id: I6010f9264dba7bcc4e82c4f4bbfb2eca561e500e
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:8821, chromium:845158
> > > Reviewed-on: https://webrtc-review.googlesource.com/78061
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#23328}
> >
> > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:8821, chromium:845158
> > Change-Id: Iebe0958012c39e1321487e5425f43904eaf5fe91
> > Reviewed-on: https://webrtc-review.googlesource.com/78705
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23403}
>
> TBR=phoglund@webrtc.org,mbonadei@webrtc.org
>
> Change-Id: I8285cf59402aa6862ea7e3ec21f885360b7050fb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8821, chromium:845158
> Reviewed-on: https://webrtc-review.googlesource.com/79420
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23416}
TBR=phoglund@webrtc.org,mbonadei@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8821, chromium:845158
Change-Id: I18ffdb0d7be61daf0b6464c68d219aa352f42dde
Reviewed-on: https://webrtc-review.googlesource.com/79582
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23435}
2018-05-29 14:22:32 +00:00
|
|
|
public_configs = [
|
|
|
|
|
rtc_common_inherited_config,
|
|
|
|
|
absl_include_config,
|
|
|
|
|
absl_define_config,
|
2019-07-18 13:44:12 +02:00
|
|
|
absl_flags_config,
|
Reland "Reland "Adding absl includes and defines to rtc_* templates.""
This reverts commit 759eb4f2ad7e23b65fe0b834f8ba7f580bf1a933.
Reason for revert:
The problem has been fixed in https://chromium-review.googlesource.com/1075889.
Original change's description:
> Revert "Reland "Adding absl includes and defines to rtc_* templates.""
>
> This reverts commit fae51e4c95780f59f4bedf6e01403ff86152e168.
>
> Reason for revert:
> When use_xcode_clang = true we get:
> error: unknown warning option '-Wno-unused-template'; did you mean '-Wno-unused-result'? [-Werror,-Wunknown-warning-option]
> error: unknown warning option '-Wno-zero-as-null-pointer-constant'; did you mean '-Wno-int-to-void-pointer-cast'? [-Werror,-Wunknown-warning-option]
>
>
> Original change's description:
> > Reland "Adding absl includes and defines to rtc_* templates."
> >
> > This reverts commit 8436a699a998e4fa30d97786142baad08f110d2a.
> >
> > Reason for revert:
> > New absl roll -> https://chromium-review.googlesource.com/1071468
> >
> > Original change's description:
> > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > >
> > > This reverts commit bdb0fe42bc46d190ca45fc5a6658eddbfa5eead5.
> > >
> > > Reason for revert: https://ci.chromium.org/buildbot/chromium.fyi/Jumbo%20Win%20x64/11502
> > >
> > > Original change's description:
> > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > >
> > > > This reverts commit 85cb19fec7caf558dee7a09aafabe01c5ac78f3f.
> > > >
> > > > Reason for revert: The new version of Abseil should fix the previous
> > > > issue.
> > > >
> > > > Original change's description:
> > > > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > > > >
> > > > > This reverts commit 9632112a16d70a146e917db4de761e6253dfc364.
> > > > >
> > > > > Reason for revert: It breaks the WebRTC roll into Chromium.
> > > > > https://chromium-review.googlesource.com/c/chromium/src/+/1061476
> > > > >
> > > > > Original change's description:
> > > > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > > > >
> > > > > > This reverts commit d161eda477491b2b97fb3f26d229c625a2a0e9b8.
> > > > > >
> > > > > > Reason for revert: The problem with iOS trybots should be fixed.
> > > > > >
> > > > > > Original change's description:
> > > > > > > Revert "Adding absl includes and defines to rtc_* templates."
> > > > > > >
> > > > > > > This reverts commit 9d8f3850f4c4faad5dc5ab32ab6f2c9c43df7b6c.
> > > > > > >
> > > > > > > Reason for revert: Breaks some trybots: https://build.chromium.org/p/client.webrtc/builders/iOS64%20Release/builds/12793.
> > > > > > >
> > > > > > > Original change's description:
> > > > > > > > Adding absl includes and defines to rtc_* templates.
> > > > > > > >
> > > > > > > > This CL implicitly adds the -I compiler flag and absl macros to WebRTC
> > > > > > > > templates. In order to include absl headers using relative paths, WebRTC
> > > > > > > > needs to ensure that all its build targets are able to see absl headers.
> > > > > > > >
> > > > > > > > This can also be done with public_deps, but WebRTC is trying to avoid
> > > > > > > > it because it creates problems with other build systems. Given this
> > > > > > > > constraint, using rtc_* templates is the most reliable solution.
> > > > > > > >
> > > > > > > > Please note that rtc_* templates are adding absl includes and defines
> > > > > > > > as public_configs, this means that build targets with WebRTC targets
> > > > > > > > in their public_deps will propagate these configs following the GN
> > > > > > > > guideline.
> > > > > > > >
> > > > > > > > Bug: webrtc:8821
> > > > > > > > Change-Id: I4aa594a524f4bd045bcb3e80d76cc27f06fe01d7
> > > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/70367
> > > > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > > Cr-Commit-Position: refs/heads/master@{#22927}
> > > > > > >
> > > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > > >
> > > > > > > Change-Id: Id8e1f881c57553386566eb1970f6b9f8632cab37
> > > > > > > No-Presubmit: true
> > > > > > > No-Tree-Checks: true
> > > > > > > No-Try: true
> > > > > > > Bug: webrtc:8821
> > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71000
> > > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Cr-Commit-Position: refs/heads/master@{#22928}
> > > > > >
> > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > >
> > > > > > Bug: webrtc:8821
> > > > > > Change-Id: I6ee2eda97bbcd4c9be25c9c4073272192b0373f8
> > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71700
> > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Cr-Commit-Position: refs/heads/master@{#23251}
> > > > >
> > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > >
> > > > > Change-Id: I61fb749797314ca514691b341c66f7f39ef45491
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: webrtc:8821
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/77220
> > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#23264}
> > > >
> > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > >
> > > > # Not skipping CQ checks because original CL landed > 1 day ago.
> > > >
> > > > Bug: webrtc:8821
> > > > Change-Id: I71dea953a002a0d526949c627653bcad0c6518fc
> > > > Reviewed-on: https://webrtc-review.googlesource.com/77781
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#23317}
> > >
> > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > >
> > > Change-Id: I6010f9264dba7bcc4e82c4f4bbfb2eca561e500e
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:8821, chromium:845158
> > > Reviewed-on: https://webrtc-review.googlesource.com/78061
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#23328}
> >
> > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:8821, chromium:845158
> > Change-Id: Iebe0958012c39e1321487e5425f43904eaf5fe91
> > Reviewed-on: https://webrtc-review.googlesource.com/78705
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23403}
>
> TBR=phoglund@webrtc.org,mbonadei@webrtc.org
>
> Change-Id: I8285cf59402aa6862ea7e3ec21f885360b7050fb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8821, chromium:845158
> Reviewed-on: https://webrtc-review.googlesource.com/79420
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23416}
TBR=phoglund@webrtc.org,mbonadei@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8821, chromium:845158
Change-Id: I18ffdb0d7be61daf0b6464c68d219aa352f42dde
Reviewed-on: https://webrtc-review.googlesource.com/79582
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23435}
2018-05-29 14:22:32 +00:00
|
|
|
]
|
2017-01-24 06:58:22 -08:00
|
|
|
if (defined(invoker.public_configs)) {
|
|
|
|
|
public_configs += invoker.public_configs
|
|
|
|
|
}
|
2017-05-26 01:51:53 -07:00
|
|
|
if (!build_with_chromium && is_android) {
|
2024-12-04 15:54:49 +01:00
|
|
|
use_default_launcher = false
|
2017-08-15 21:48:37 +08:00
|
|
|
android_manifest = webrtc_root + "test/android/AndroidManifest.xml"
|
2021-04-14 18:53:11 -04:00
|
|
|
use_raw_android_executable = false
|
2020-06-25 22:57:49 +02:00
|
|
|
min_sdk_version = 21
|
2025-01-10 08:35:53 +00:00
|
|
|
target_sdk_version = 24
|
2021-04-12 19:03:37 +02:00
|
|
|
deps += [
|
|
|
|
|
"//build/android/gtest_apk:native_test_instrumentation_test_runner_java",
|
2024-12-04 15:54:49 +01:00
|
|
|
webrtc_root + "sdk/android:native_test_jni_onload",
|
|
|
|
|
webrtc_root + "sdk/android:base_java",
|
2021-04-12 19:03:37 +02:00
|
|
|
webrtc_root + "test:native_test_java",
|
2024-12-04 15:54:49 +01:00
|
|
|
webrtc_root + "test:native_test_support",
|
2025-02-13 09:22:25 +00:00
|
|
|
"//third_party/jni_zero:jni_zero_java",
|
2021-04-12 19:03:37 +02:00
|
|
|
]
|
2017-05-26 01:51:53 -07:00
|
|
|
}
|
2020-11-25 16:41:37 +01:00
|
|
|
|
2022-05-04 10:59:56 +02:00
|
|
|
# Build //test:google_test_runner_objc when the test is not a real XCTest.
|
2022-03-15 09:08:29 +01:00
|
|
|
if (is_ios && rtc_include_tests) {
|
2020-11-25 16:41:37 +01:00
|
|
|
if (!defined(invoker.is_xctest) || !invoker.is_xctest) {
|
2022-05-04 10:59:56 +02:00
|
|
|
xctest_module_target = "//test:google_test_runner_objc"
|
2020-11-25 16:41:37 +01:00
|
|
|
}
|
|
|
|
|
}
|
2021-01-29 10:50:19 +00:00
|
|
|
|
2024-05-27 10:19:05 +00:00
|
|
|
assert(
|
|
|
|
|
!defined(absl_deps),
|
|
|
|
|
"`absl_deps` has been deprecated, add your Abseil dependencies to the `deps` variable.")
|
2024-05-20 09:57:05 +00:00
|
|
|
|
2024-05-27 10:19:05 +00:00
|
|
|
# Abseil dependencies need to be converted to //third_party/abseil-cpp:absl when build_with_chromium=true
|
2024-05-20 09:57:05 +00:00
|
|
|
if (build_with_chromium && defined(deps)) {
|
2024-05-27 10:19:05 +00:00
|
|
|
absl_dependencies =
|
|
|
|
|
filter_labels_include(deps, [ "//third_party/abseil-cpp/*" ])
|
2024-05-20 09:57:05 +00:00
|
|
|
if (absl_dependencies != []) {
|
2024-05-27 10:19:05 +00:00
|
|
|
filtered_deps =
|
|
|
|
|
filter_labels_exclude(deps, [ "//third_party/abseil-cpp/*" ])
|
2024-05-20 09:57:05 +00:00
|
|
|
deps = []
|
|
|
|
|
deps = filtered_deps
|
2021-01-29 10:50:19 +00:00
|
|
|
deps += [ "//third_party/abseil-cpp:absl" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-18 10:16:32 +01:00
|
|
|
# TODO(crbug.com/webrtc/13556): Adding the .app folder in the runtime_deps
|
|
|
|
|
# shoulnd't be necessary. this code should be removed and the same solution
|
|
|
|
|
# as Chromium should be used.
|
|
|
|
|
if (is_ios) {
|
|
|
|
|
if (!defined(invoker.data)) {
|
|
|
|
|
data = []
|
|
|
|
|
}
|
|
|
|
|
data += [ "${root_out_dir}/${target_name}.app" ]
|
|
|
|
|
}
|
2017-01-24 06:58:22 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template("rtc_source_set") {
|
|
|
|
|
source_set(target_name) {
|
|
|
|
|
forward_variables_from(invoker,
|
|
|
|
|
"*",
|
|
|
|
|
[
|
|
|
|
|
"configs",
|
|
|
|
|
"public_configs",
|
|
|
|
|
"suppressed_configs",
|
2017-10-16 11:16:19 +02:00
|
|
|
"visibility",
|
2017-01-24 06:58:22 -08:00
|
|
|
])
|
2017-10-16 11:16:19 +02:00
|
|
|
forward_variables_from(invoker, [ "visibility" ])
|
2018-01-10 15:54:53 +00:00
|
|
|
if (!defined(visibility)) {
|
|
|
|
|
visibility = webrtc_default_visibility
|
|
|
|
|
}
|
2018-04-22 19:55:00 +02:00
|
|
|
|
|
|
|
|
# What's your poison?
|
|
|
|
|
if (defined(testonly) && testonly) {
|
|
|
|
|
assert(!defined(poisonous))
|
|
|
|
|
assert(!defined(allow_poison))
|
|
|
|
|
} else {
|
|
|
|
|
if (!defined(poisonous)) {
|
|
|
|
|
poisonous = []
|
|
|
|
|
}
|
|
|
|
|
if (!defined(allow_poison)) {
|
|
|
|
|
allow_poison = []
|
|
|
|
|
}
|
|
|
|
|
if (!defined(assert_no_deps)) {
|
|
|
|
|
assert_no_deps = []
|
|
|
|
|
}
|
|
|
|
|
if (!defined(deps)) {
|
|
|
|
|
deps = []
|
|
|
|
|
}
|
|
|
|
|
foreach(p, poisonous) {
|
|
|
|
|
deps += [ webrtc_root + ":poison_" + p ]
|
|
|
|
|
}
|
|
|
|
|
foreach(poison_type, all_poison_types) {
|
|
|
|
|
allow_dep = true
|
|
|
|
|
foreach(v, visibility) {
|
|
|
|
|
if (v == "*") {
|
|
|
|
|
allow_dep = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
foreach(p, allow_poison + poisonous) {
|
|
|
|
|
if (p == poison_type) {
|
|
|
|
|
allow_dep = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!allow_dep) {
|
|
|
|
|
assert_no_deps += [ webrtc_root + ":poison_" + poison_type ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-15 16:08:41 +01:00
|
|
|
# Chromium should only depend on the WebRTC component in order to
|
|
|
|
|
# avoid to statically link WebRTC in a component build.
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
|
publicly_visible = false
|
|
|
|
|
foreach(v, visibility) {
|
|
|
|
|
if (v == "*") {
|
|
|
|
|
publicly_visible = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (publicly_visible) {
|
|
|
|
|
visibility = []
|
|
|
|
|
visibility = webrtc_default_visibility
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-06 13:45:44 +02:00
|
|
|
if (!defined(testonly) || !testonly) {
|
|
|
|
|
configs += rtc_prod_configs
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
configs += invoker.configs
|
2018-09-18 13:15:54 +02:00
|
|
|
configs += rtc_library_impl_config
|
2017-01-24 06:58:22 -08:00
|
|
|
configs -= rtc_remove_configs
|
|
|
|
|
configs -= invoker.suppressed_configs
|
Reland "Reland "Adding absl includes and defines to rtc_* templates.""
This reverts commit 759eb4f2ad7e23b65fe0b834f8ba7f580bf1a933.
Reason for revert:
The problem has been fixed in https://chromium-review.googlesource.com/1075889.
Original change's description:
> Revert "Reland "Adding absl includes and defines to rtc_* templates.""
>
> This reverts commit fae51e4c95780f59f4bedf6e01403ff86152e168.
>
> Reason for revert:
> When use_xcode_clang = true we get:
> error: unknown warning option '-Wno-unused-template'; did you mean '-Wno-unused-result'? [-Werror,-Wunknown-warning-option]
> error: unknown warning option '-Wno-zero-as-null-pointer-constant'; did you mean '-Wno-int-to-void-pointer-cast'? [-Werror,-Wunknown-warning-option]
>
>
> Original change's description:
> > Reland "Adding absl includes and defines to rtc_* templates."
> >
> > This reverts commit 8436a699a998e4fa30d97786142baad08f110d2a.
> >
> > Reason for revert:
> > New absl roll -> https://chromium-review.googlesource.com/1071468
> >
> > Original change's description:
> > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > >
> > > This reverts commit bdb0fe42bc46d190ca45fc5a6658eddbfa5eead5.
> > >
> > > Reason for revert: https://ci.chromium.org/buildbot/chromium.fyi/Jumbo%20Win%20x64/11502
> > >
> > > Original change's description:
> > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > >
> > > > This reverts commit 85cb19fec7caf558dee7a09aafabe01c5ac78f3f.
> > > >
> > > > Reason for revert: The new version of Abseil should fix the previous
> > > > issue.
> > > >
> > > > Original change's description:
> > > > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > > > >
> > > > > This reverts commit 9632112a16d70a146e917db4de761e6253dfc364.
> > > > >
> > > > > Reason for revert: It breaks the WebRTC roll into Chromium.
> > > > > https://chromium-review.googlesource.com/c/chromium/src/+/1061476
> > > > >
> > > > > Original change's description:
> > > > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > > > >
> > > > > > This reverts commit d161eda477491b2b97fb3f26d229c625a2a0e9b8.
> > > > > >
> > > > > > Reason for revert: The problem with iOS trybots should be fixed.
> > > > > >
> > > > > > Original change's description:
> > > > > > > Revert "Adding absl includes and defines to rtc_* templates."
> > > > > > >
> > > > > > > This reverts commit 9d8f3850f4c4faad5dc5ab32ab6f2c9c43df7b6c.
> > > > > > >
> > > > > > > Reason for revert: Breaks some trybots: https://build.chromium.org/p/client.webrtc/builders/iOS64%20Release/builds/12793.
> > > > > > >
> > > > > > > Original change's description:
> > > > > > > > Adding absl includes and defines to rtc_* templates.
> > > > > > > >
> > > > > > > > This CL implicitly adds the -I compiler flag and absl macros to WebRTC
> > > > > > > > templates. In order to include absl headers using relative paths, WebRTC
> > > > > > > > needs to ensure that all its build targets are able to see absl headers.
> > > > > > > >
> > > > > > > > This can also be done with public_deps, but WebRTC is trying to avoid
> > > > > > > > it because it creates problems with other build systems. Given this
> > > > > > > > constraint, using rtc_* templates is the most reliable solution.
> > > > > > > >
> > > > > > > > Please note that rtc_* templates are adding absl includes and defines
> > > > > > > > as public_configs, this means that build targets with WebRTC targets
> > > > > > > > in their public_deps will propagate these configs following the GN
> > > > > > > > guideline.
> > > > > > > >
> > > > > > > > Bug: webrtc:8821
> > > > > > > > Change-Id: I4aa594a524f4bd045bcb3e80d76cc27f06fe01d7
> > > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/70367
> > > > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > > Cr-Commit-Position: refs/heads/master@{#22927}
> > > > > > >
> > > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > > >
> > > > > > > Change-Id: Id8e1f881c57553386566eb1970f6b9f8632cab37
> > > > > > > No-Presubmit: true
> > > > > > > No-Tree-Checks: true
> > > > > > > No-Try: true
> > > > > > > Bug: webrtc:8821
> > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71000
> > > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Cr-Commit-Position: refs/heads/master@{#22928}
> > > > > >
> > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > >
> > > > > > Bug: webrtc:8821
> > > > > > Change-Id: I6ee2eda97bbcd4c9be25c9c4073272192b0373f8
> > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71700
> > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Cr-Commit-Position: refs/heads/master@{#23251}
> > > > >
> > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > >
> > > > > Change-Id: I61fb749797314ca514691b341c66f7f39ef45491
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: webrtc:8821
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/77220
> > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#23264}
> > > >
> > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > >
> > > > # Not skipping CQ checks because original CL landed > 1 day ago.
> > > >
> > > > Bug: webrtc:8821
> > > > Change-Id: I71dea953a002a0d526949c627653bcad0c6518fc
> > > > Reviewed-on: https://webrtc-review.googlesource.com/77781
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#23317}
> > >
> > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > >
> > > Change-Id: I6010f9264dba7bcc4e82c4f4bbfb2eca561e500e
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:8821, chromium:845158
> > > Reviewed-on: https://webrtc-review.googlesource.com/78061
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#23328}
> >
> > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:8821, chromium:845158
> > Change-Id: Iebe0958012c39e1321487e5425f43904eaf5fe91
> > Reviewed-on: https://webrtc-review.googlesource.com/78705
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23403}
>
> TBR=phoglund@webrtc.org,mbonadei@webrtc.org
>
> Change-Id: I8285cf59402aa6862ea7e3ec21f885360b7050fb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8821, chromium:845158
> Reviewed-on: https://webrtc-review.googlesource.com/79420
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23416}
TBR=phoglund@webrtc.org,mbonadei@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8821, chromium:845158
Change-Id: I18ffdb0d7be61daf0b6464c68d219aa352f42dde
Reviewed-on: https://webrtc-review.googlesource.com/79582
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23435}
2018-05-29 14:22:32 +00:00
|
|
|
public_configs = [
|
|
|
|
|
rtc_common_inherited_config,
|
|
|
|
|
absl_include_config,
|
|
|
|
|
absl_define_config,
|
|
|
|
|
]
|
2019-07-18 13:44:12 +02:00
|
|
|
if (defined(testonly) && testonly) {
|
|
|
|
|
public_configs += [ absl_flags_config ]
|
|
|
|
|
}
|
2017-01-24 06:58:22 -08:00
|
|
|
if (defined(invoker.public_configs)) {
|
|
|
|
|
public_configs += invoker.public_configs
|
|
|
|
|
}
|
2020-06-03 21:23:41 +02:00
|
|
|
|
2024-05-27 10:19:05 +00:00
|
|
|
assert(
|
|
|
|
|
!defined(absl_deps),
|
|
|
|
|
"`absl_deps` has been deprecated, add your Abseil dependencies to the `deps` variable.")
|
2024-05-20 09:57:05 +00:00
|
|
|
|
2024-05-27 10:19:05 +00:00
|
|
|
# Abseil dependencies need to be converted to //third_party/abseil-cpp:absl when build_with_chromium=true
|
2024-05-20 09:57:05 +00:00
|
|
|
if (build_with_chromium && defined(deps)) {
|
2024-05-27 10:19:05 +00:00
|
|
|
absl_dependencies =
|
|
|
|
|
filter_labels_include(deps, [ "//third_party/abseil-cpp/*" ])
|
2024-05-20 09:57:05 +00:00
|
|
|
if (absl_dependencies != []) {
|
2024-05-27 10:19:05 +00:00
|
|
|
filtered_deps =
|
|
|
|
|
filter_labels_exclude(deps, [ "//third_party/abseil-cpp/*" ])
|
2024-05-20 09:57:05 +00:00
|
|
|
deps = []
|
|
|
|
|
deps = filtered_deps
|
2020-06-11 11:25:32 +02:00
|
|
|
deps += [ "//third_party/abseil-cpp:absl" ]
|
2020-06-03 21:23:41 +02:00
|
|
|
}
|
|
|
|
|
}
|
2017-01-24 06:58:22 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
template("rtc_static_library") {
|
|
|
|
|
static_library(target_name) {
|
2017-01-24 06:58:22 -08:00
|
|
|
forward_variables_from(invoker,
|
|
|
|
|
"*",
|
|
|
|
|
[
|
|
|
|
|
"configs",
|
|
|
|
|
"public_configs",
|
|
|
|
|
"suppressed_configs",
|
2017-10-16 11:16:19 +02:00
|
|
|
"visibility",
|
2017-01-24 06:58:22 -08:00
|
|
|
])
|
2017-10-16 11:16:19 +02:00
|
|
|
forward_variables_from(invoker, [ "visibility" ])
|
2018-01-10 15:54:53 +00:00
|
|
|
if (!defined(visibility)) {
|
|
|
|
|
visibility = webrtc_default_visibility
|
|
|
|
|
}
|
2019-10-17 21:32:04 +02:00
|
|
|
|
|
|
|
|
# What's your poison?
|
|
|
|
|
if (defined(testonly) && testonly) {
|
|
|
|
|
assert(!defined(poisonous))
|
|
|
|
|
assert(!defined(allow_poison))
|
|
|
|
|
} else {
|
|
|
|
|
if (!defined(poisonous)) {
|
|
|
|
|
poisonous = []
|
|
|
|
|
}
|
|
|
|
|
if (!defined(allow_poison)) {
|
|
|
|
|
allow_poison = []
|
|
|
|
|
}
|
|
|
|
|
if (!defined(assert_no_deps)) {
|
|
|
|
|
assert_no_deps = []
|
|
|
|
|
}
|
|
|
|
|
if (!defined(deps)) {
|
|
|
|
|
deps = []
|
|
|
|
|
}
|
|
|
|
|
foreach(p, poisonous) {
|
|
|
|
|
deps += [ webrtc_root + ":poison_" + p ]
|
|
|
|
|
}
|
|
|
|
|
foreach(poison_type, all_poison_types) {
|
|
|
|
|
allow_dep = true
|
|
|
|
|
foreach(v, visibility) {
|
|
|
|
|
if (v == "*") {
|
|
|
|
|
allow_dep = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
foreach(p, allow_poison + poisonous) {
|
|
|
|
|
if (p == poison_type) {
|
|
|
|
|
allow_dep = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!allow_dep) {
|
|
|
|
|
assert_no_deps += [ webrtc_root + ":poison_" + poison_type ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!defined(testonly) || !testonly) {
|
|
|
|
|
configs += rtc_prod_configs
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
configs += invoker.configs
|
2019-10-17 21:32:04 +02:00
|
|
|
configs += rtc_library_impl_config
|
2017-01-24 06:58:22 -08:00
|
|
|
configs -= rtc_remove_configs
|
|
|
|
|
configs -= invoker.suppressed_configs
|
Reland "Reland "Adding absl includes and defines to rtc_* templates.""
This reverts commit 759eb4f2ad7e23b65fe0b834f8ba7f580bf1a933.
Reason for revert:
The problem has been fixed in https://chromium-review.googlesource.com/1075889.
Original change's description:
> Revert "Reland "Adding absl includes and defines to rtc_* templates.""
>
> This reverts commit fae51e4c95780f59f4bedf6e01403ff86152e168.
>
> Reason for revert:
> When use_xcode_clang = true we get:
> error: unknown warning option '-Wno-unused-template'; did you mean '-Wno-unused-result'? [-Werror,-Wunknown-warning-option]
> error: unknown warning option '-Wno-zero-as-null-pointer-constant'; did you mean '-Wno-int-to-void-pointer-cast'? [-Werror,-Wunknown-warning-option]
>
>
> Original change's description:
> > Reland "Adding absl includes and defines to rtc_* templates."
> >
> > This reverts commit 8436a699a998e4fa30d97786142baad08f110d2a.
> >
> > Reason for revert:
> > New absl roll -> https://chromium-review.googlesource.com/1071468
> >
> > Original change's description:
> > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > >
> > > This reverts commit bdb0fe42bc46d190ca45fc5a6658eddbfa5eead5.
> > >
> > > Reason for revert: https://ci.chromium.org/buildbot/chromium.fyi/Jumbo%20Win%20x64/11502
> > >
> > > Original change's description:
> > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > >
> > > > This reverts commit 85cb19fec7caf558dee7a09aafabe01c5ac78f3f.
> > > >
> > > > Reason for revert: The new version of Abseil should fix the previous
> > > > issue.
> > > >
> > > > Original change's description:
> > > > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > > > >
> > > > > This reverts commit 9632112a16d70a146e917db4de761e6253dfc364.
> > > > >
> > > > > Reason for revert: It breaks the WebRTC roll into Chromium.
> > > > > https://chromium-review.googlesource.com/c/chromium/src/+/1061476
> > > > >
> > > > > Original change's description:
> > > > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > > > >
> > > > > > This reverts commit d161eda477491b2b97fb3f26d229c625a2a0e9b8.
> > > > > >
> > > > > > Reason for revert: The problem with iOS trybots should be fixed.
> > > > > >
> > > > > > Original change's description:
> > > > > > > Revert "Adding absl includes and defines to rtc_* templates."
> > > > > > >
> > > > > > > This reverts commit 9d8f3850f4c4faad5dc5ab32ab6f2c9c43df7b6c.
> > > > > > >
> > > > > > > Reason for revert: Breaks some trybots: https://build.chromium.org/p/client.webrtc/builders/iOS64%20Release/builds/12793.
> > > > > > >
> > > > > > > Original change's description:
> > > > > > > > Adding absl includes and defines to rtc_* templates.
> > > > > > > >
> > > > > > > > This CL implicitly adds the -I compiler flag and absl macros to WebRTC
> > > > > > > > templates. In order to include absl headers using relative paths, WebRTC
> > > > > > > > needs to ensure that all its build targets are able to see absl headers.
> > > > > > > >
> > > > > > > > This can also be done with public_deps, but WebRTC is trying to avoid
> > > > > > > > it because it creates problems with other build systems. Given this
> > > > > > > > constraint, using rtc_* templates is the most reliable solution.
> > > > > > > >
> > > > > > > > Please note that rtc_* templates are adding absl includes and defines
> > > > > > > > as public_configs, this means that build targets with WebRTC targets
> > > > > > > > in their public_deps will propagate these configs following the GN
> > > > > > > > guideline.
> > > > > > > >
> > > > > > > > Bug: webrtc:8821
> > > > > > > > Change-Id: I4aa594a524f4bd045bcb3e80d76cc27f06fe01d7
> > > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/70367
> > > > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > > Cr-Commit-Position: refs/heads/master@{#22927}
> > > > > > >
> > > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > > >
> > > > > > > Change-Id: Id8e1f881c57553386566eb1970f6b9f8632cab37
> > > > > > > No-Presubmit: true
> > > > > > > No-Tree-Checks: true
> > > > > > > No-Try: true
> > > > > > > Bug: webrtc:8821
> > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71000
> > > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Cr-Commit-Position: refs/heads/master@{#22928}
> > > > > >
> > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > >
> > > > > > Bug: webrtc:8821
> > > > > > Change-Id: I6ee2eda97bbcd4c9be25c9c4073272192b0373f8
> > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71700
> > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Cr-Commit-Position: refs/heads/master@{#23251}
> > > > >
> > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > >
> > > > > Change-Id: I61fb749797314ca514691b341c66f7f39ef45491
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: webrtc:8821
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/77220
> > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#23264}
> > > >
> > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > >
> > > > # Not skipping CQ checks because original CL landed > 1 day ago.
> > > >
> > > > Bug: webrtc:8821
> > > > Change-Id: I71dea953a002a0d526949c627653bcad0c6518fc
> > > > Reviewed-on: https://webrtc-review.googlesource.com/77781
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#23317}
> > >
> > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > >
> > > Change-Id: I6010f9264dba7bcc4e82c4f4bbfb2eca561e500e
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:8821, chromium:845158
> > > Reviewed-on: https://webrtc-review.googlesource.com/78061
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#23328}
> >
> > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:8821, chromium:845158
> > Change-Id: Iebe0958012c39e1321487e5425f43904eaf5fe91
> > Reviewed-on: https://webrtc-review.googlesource.com/78705
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23403}
>
> TBR=phoglund@webrtc.org,mbonadei@webrtc.org
>
> Change-Id: I8285cf59402aa6862ea7e3ec21f885360b7050fb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8821, chromium:845158
> Reviewed-on: https://webrtc-review.googlesource.com/79420
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23416}
TBR=phoglund@webrtc.org,mbonadei@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8821, chromium:845158
Change-Id: I18ffdb0d7be61daf0b6464c68d219aa352f42dde
Reviewed-on: https://webrtc-review.googlesource.com/79582
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23435}
2018-05-29 14:22:32 +00:00
|
|
|
public_configs = [
|
|
|
|
|
rtc_common_inherited_config,
|
|
|
|
|
absl_include_config,
|
|
|
|
|
absl_define_config,
|
|
|
|
|
]
|
2019-07-18 13:44:12 +02:00
|
|
|
if (defined(testonly) && testonly) {
|
|
|
|
|
public_configs += [ absl_flags_config ]
|
|
|
|
|
}
|
2017-01-24 06:58:22 -08:00
|
|
|
if (defined(invoker.public_configs)) {
|
|
|
|
|
public_configs += invoker.public_configs
|
|
|
|
|
}
|
2020-06-03 21:23:41 +02:00
|
|
|
|
2024-05-27 10:19:05 +00:00
|
|
|
assert(
|
|
|
|
|
!defined(absl_deps),
|
|
|
|
|
"`absl_deps` has been deprecated, add your Abseil dependencies to the `deps` variable.")
|
2024-05-20 09:57:05 +00:00
|
|
|
|
2024-05-27 10:19:05 +00:00
|
|
|
# Abseil dependencies need to be converted to //third_party/abseil-cpp:absl when build_with_chromium=true
|
2024-05-20 09:57:05 +00:00
|
|
|
if (build_with_chromium && defined(deps)) {
|
2024-05-27 10:19:05 +00:00
|
|
|
absl_dependencies =
|
|
|
|
|
filter_labels_include(deps, [ "//third_party/abseil-cpp/*" ])
|
2024-05-20 09:57:05 +00:00
|
|
|
if (absl_dependencies != []) {
|
2024-05-27 10:19:05 +00:00
|
|
|
filtered_deps =
|
|
|
|
|
filter_labels_exclude(deps, [ "//third_party/abseil-cpp/*" ])
|
2024-05-20 09:57:05 +00:00
|
|
|
deps = []
|
|
|
|
|
deps = filtered_deps
|
2020-06-11 11:25:32 +02:00
|
|
|
deps += [ "//third_party/abseil-cpp:absl" ]
|
2020-06-03 21:23:41 +02:00
|
|
|
}
|
|
|
|
|
}
|
2017-01-24 06:58:22 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
# This template automatically switches the target type between source_set
|
|
|
|
|
# and static_library.
|
|
|
|
|
#
|
2022-04-26 02:22:35 +02:00
|
|
|
# This should be the default target type for all the WebRTC targets.
|
2019-10-17 21:32:04 +02:00
|
|
|
#
|
|
|
|
|
# How does it work:
|
|
|
|
|
# Since all files in a source_set are linked into a final binary, while files
|
|
|
|
|
# in a static library are only linked in if at least one symbol in them is
|
|
|
|
|
# referenced, in component builds source_sets are easy to deal with because
|
|
|
|
|
# all their object files are passed to the linker to create a shared library.
|
|
|
|
|
# In release builds instead, static_libraries are preferred since they allow
|
|
|
|
|
# the linker to discard dead code.
|
|
|
|
|
# For the same reason, testonly targets will always be expanded to
|
|
|
|
|
# source_set in order to be sure that tests are present in the test binary.
|
|
|
|
|
template("rtc_library") {
|
2022-04-26 02:22:35 +02:00
|
|
|
header_only = true
|
|
|
|
|
if (defined(invoker.sources)) {
|
|
|
|
|
non_header_sources = filter_exclude(invoker.sources,
|
|
|
|
|
[
|
|
|
|
|
"*.h",
|
|
|
|
|
"*.hh",
|
|
|
|
|
"*.inc",
|
|
|
|
|
])
|
|
|
|
|
if (non_header_sources != []) {
|
|
|
|
|
header_only = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Header only libraries should use source_set as a static_library with no
|
|
|
|
|
# source files will cause issues with macOS libtool.
|
|
|
|
|
if (header_only || is_component_build ||
|
|
|
|
|
(defined(invoker.testonly) && invoker.testonly)) {
|
2019-10-17 21:32:04 +02:00
|
|
|
target_type = "source_set"
|
|
|
|
|
} else {
|
|
|
|
|
target_type = "static_library"
|
|
|
|
|
}
|
|
|
|
|
target(target_type, target_name) {
|
2017-01-24 06:58:22 -08:00
|
|
|
forward_variables_from(invoker,
|
|
|
|
|
"*",
|
|
|
|
|
[
|
|
|
|
|
"configs",
|
|
|
|
|
"public_configs",
|
|
|
|
|
"suppressed_configs",
|
2017-10-16 11:16:19 +02:00
|
|
|
"visibility",
|
2017-01-24 06:58:22 -08:00
|
|
|
])
|
2017-10-16 11:16:19 +02:00
|
|
|
forward_variables_from(invoker, [ "visibility" ])
|
2018-01-10 15:54:53 +00:00
|
|
|
if (!defined(visibility)) {
|
|
|
|
|
visibility = webrtc_default_visibility
|
|
|
|
|
}
|
2018-04-22 19:55:00 +02:00
|
|
|
|
|
|
|
|
# What's your poison?
|
|
|
|
|
if (defined(testonly) && testonly) {
|
|
|
|
|
assert(!defined(poisonous))
|
|
|
|
|
assert(!defined(allow_poison))
|
|
|
|
|
} else {
|
|
|
|
|
if (!defined(poisonous)) {
|
|
|
|
|
poisonous = []
|
|
|
|
|
}
|
|
|
|
|
if (!defined(allow_poison)) {
|
|
|
|
|
allow_poison = []
|
|
|
|
|
}
|
|
|
|
|
if (!defined(assert_no_deps)) {
|
|
|
|
|
assert_no_deps = []
|
|
|
|
|
}
|
|
|
|
|
if (!defined(deps)) {
|
|
|
|
|
deps = []
|
|
|
|
|
}
|
|
|
|
|
foreach(p, poisonous) {
|
|
|
|
|
deps += [ webrtc_root + ":poison_" + p ]
|
|
|
|
|
}
|
|
|
|
|
foreach(poison_type, all_poison_types) {
|
|
|
|
|
allow_dep = true
|
|
|
|
|
foreach(v, visibility) {
|
|
|
|
|
if (v == "*") {
|
|
|
|
|
allow_dep = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
foreach(p, allow_poison + poisonous) {
|
|
|
|
|
if (p == poison_type) {
|
|
|
|
|
allow_dep = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!allow_dep) {
|
|
|
|
|
assert_no_deps += [ webrtc_root + ":poison_" + poison_type ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-11-15 16:08:41 +01:00
|
|
|
# Chromium should only depend on the WebRTC component in order to
|
|
|
|
|
# avoid to statically link WebRTC in a component build.
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
|
publicly_visible = false
|
|
|
|
|
foreach(v, visibility) {
|
|
|
|
|
if (v == "*") {
|
|
|
|
|
publicly_visible = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (publicly_visible) {
|
|
|
|
|
visibility = []
|
|
|
|
|
visibility = webrtc_default_visibility
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-06 13:45:44 +02:00
|
|
|
if (!defined(testonly) || !testonly) {
|
|
|
|
|
configs += rtc_prod_configs
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
configs += invoker.configs
|
2018-09-18 13:15:54 +02:00
|
|
|
configs += rtc_library_impl_config
|
2017-01-24 06:58:22 -08:00
|
|
|
configs -= rtc_remove_configs
|
|
|
|
|
configs -= invoker.suppressed_configs
|
Reland "Reland "Adding absl includes and defines to rtc_* templates.""
This reverts commit 759eb4f2ad7e23b65fe0b834f8ba7f580bf1a933.
Reason for revert:
The problem has been fixed in https://chromium-review.googlesource.com/1075889.
Original change's description:
> Revert "Reland "Adding absl includes and defines to rtc_* templates.""
>
> This reverts commit fae51e4c95780f59f4bedf6e01403ff86152e168.
>
> Reason for revert:
> When use_xcode_clang = true we get:
> error: unknown warning option '-Wno-unused-template'; did you mean '-Wno-unused-result'? [-Werror,-Wunknown-warning-option]
> error: unknown warning option '-Wno-zero-as-null-pointer-constant'; did you mean '-Wno-int-to-void-pointer-cast'? [-Werror,-Wunknown-warning-option]
>
>
> Original change's description:
> > Reland "Adding absl includes and defines to rtc_* templates."
> >
> > This reverts commit 8436a699a998e4fa30d97786142baad08f110d2a.
> >
> > Reason for revert:
> > New absl roll -> https://chromium-review.googlesource.com/1071468
> >
> > Original change's description:
> > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > >
> > > This reverts commit bdb0fe42bc46d190ca45fc5a6658eddbfa5eead5.
> > >
> > > Reason for revert: https://ci.chromium.org/buildbot/chromium.fyi/Jumbo%20Win%20x64/11502
> > >
> > > Original change's description:
> > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > >
> > > > This reverts commit 85cb19fec7caf558dee7a09aafabe01c5ac78f3f.
> > > >
> > > > Reason for revert: The new version of Abseil should fix the previous
> > > > issue.
> > > >
> > > > Original change's description:
> > > > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > > > >
> > > > > This reverts commit 9632112a16d70a146e917db4de761e6253dfc364.
> > > > >
> > > > > Reason for revert: It breaks the WebRTC roll into Chromium.
> > > > > https://chromium-review.googlesource.com/c/chromium/src/+/1061476
> > > > >
> > > > > Original change's description:
> > > > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > > > >
> > > > > > This reverts commit d161eda477491b2b97fb3f26d229c625a2a0e9b8.
> > > > > >
> > > > > > Reason for revert: The problem with iOS trybots should be fixed.
> > > > > >
> > > > > > Original change's description:
> > > > > > > Revert "Adding absl includes and defines to rtc_* templates."
> > > > > > >
> > > > > > > This reverts commit 9d8f3850f4c4faad5dc5ab32ab6f2c9c43df7b6c.
> > > > > > >
> > > > > > > Reason for revert: Breaks some trybots: https://build.chromium.org/p/client.webrtc/builders/iOS64%20Release/builds/12793.
> > > > > > >
> > > > > > > Original change's description:
> > > > > > > > Adding absl includes and defines to rtc_* templates.
> > > > > > > >
> > > > > > > > This CL implicitly adds the -I compiler flag and absl macros to WebRTC
> > > > > > > > templates. In order to include absl headers using relative paths, WebRTC
> > > > > > > > needs to ensure that all its build targets are able to see absl headers.
> > > > > > > >
> > > > > > > > This can also be done with public_deps, but WebRTC is trying to avoid
> > > > > > > > it because it creates problems with other build systems. Given this
> > > > > > > > constraint, using rtc_* templates is the most reliable solution.
> > > > > > > >
> > > > > > > > Please note that rtc_* templates are adding absl includes and defines
> > > > > > > > as public_configs, this means that build targets with WebRTC targets
> > > > > > > > in their public_deps will propagate these configs following the GN
> > > > > > > > guideline.
> > > > > > > >
> > > > > > > > Bug: webrtc:8821
> > > > > > > > Change-Id: I4aa594a524f4bd045bcb3e80d76cc27f06fe01d7
> > > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/70367
> > > > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > > Cr-Commit-Position: refs/heads/master@{#22927}
> > > > > > >
> > > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > > >
> > > > > > > Change-Id: Id8e1f881c57553386566eb1970f6b9f8632cab37
> > > > > > > No-Presubmit: true
> > > > > > > No-Tree-Checks: true
> > > > > > > No-Try: true
> > > > > > > Bug: webrtc:8821
> > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71000
> > > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Cr-Commit-Position: refs/heads/master@{#22928}
> > > > > >
> > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > >
> > > > > > Bug: webrtc:8821
> > > > > > Change-Id: I6ee2eda97bbcd4c9be25c9c4073272192b0373f8
> > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71700
> > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Cr-Commit-Position: refs/heads/master@{#23251}
> > > > >
> > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > >
> > > > > Change-Id: I61fb749797314ca514691b341c66f7f39ef45491
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: webrtc:8821
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/77220
> > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#23264}
> > > >
> > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > >
> > > > # Not skipping CQ checks because original CL landed > 1 day ago.
> > > >
> > > > Bug: webrtc:8821
> > > > Change-Id: I71dea953a002a0d526949c627653bcad0c6518fc
> > > > Reviewed-on: https://webrtc-review.googlesource.com/77781
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#23317}
> > >
> > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > >
> > > Change-Id: I6010f9264dba7bcc4e82c4f4bbfb2eca561e500e
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:8821, chromium:845158
> > > Reviewed-on: https://webrtc-review.googlesource.com/78061
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#23328}
> >
> > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:8821, chromium:845158
> > Change-Id: Iebe0958012c39e1321487e5425f43904eaf5fe91
> > Reviewed-on: https://webrtc-review.googlesource.com/78705
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23403}
>
> TBR=phoglund@webrtc.org,mbonadei@webrtc.org
>
> Change-Id: I8285cf59402aa6862ea7e3ec21f885360b7050fb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8821, chromium:845158
> Reviewed-on: https://webrtc-review.googlesource.com/79420
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23416}
TBR=phoglund@webrtc.org,mbonadei@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8821, chromium:845158
Change-Id: I18ffdb0d7be61daf0b6464c68d219aa352f42dde
Reviewed-on: https://webrtc-review.googlesource.com/79582
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23435}
2018-05-29 14:22:32 +00:00
|
|
|
public_configs = [
|
|
|
|
|
rtc_common_inherited_config,
|
|
|
|
|
absl_include_config,
|
|
|
|
|
absl_define_config,
|
|
|
|
|
]
|
2019-07-18 13:44:12 +02:00
|
|
|
if (defined(testonly) && testonly) {
|
|
|
|
|
public_configs += [ absl_flags_config ]
|
|
|
|
|
}
|
2017-01-24 06:58:22 -08:00
|
|
|
if (defined(invoker.public_configs)) {
|
|
|
|
|
public_configs += invoker.public_configs
|
|
|
|
|
}
|
2020-06-03 21:23:41 +02:00
|
|
|
|
2024-05-27 10:19:05 +00:00
|
|
|
assert(
|
|
|
|
|
!defined(absl_deps),
|
|
|
|
|
"`absl_deps` has been deprecated, add your Abseil dependencies to the `deps` variable.")
|
2024-05-20 09:57:05 +00:00
|
|
|
|
2024-05-27 10:19:05 +00:00
|
|
|
# Abseil dependencies need to be converted to //third_party/abseil-cpp:absl when build_with_chromium=true
|
2024-05-20 09:57:05 +00:00
|
|
|
if (build_with_chromium && defined(deps)) {
|
2024-05-27 10:19:05 +00:00
|
|
|
absl_dependencies =
|
|
|
|
|
filter_labels_include(deps, [ "//third_party/abseil-cpp/*" ])
|
2024-05-20 09:57:05 +00:00
|
|
|
if (absl_dependencies != []) {
|
2024-05-27 10:19:05 +00:00
|
|
|
filtered_deps =
|
|
|
|
|
filter_labels_exclude(deps, [ "//third_party/abseil-cpp/*" ])
|
2024-05-20 09:57:05 +00:00
|
|
|
deps = []
|
|
|
|
|
deps = filtered_deps
|
2020-06-11 11:25:32 +02:00
|
|
|
deps += [ "//third_party/abseil-cpp:absl" ]
|
2020-06-03 21:23:41 +02:00
|
|
|
}
|
|
|
|
|
}
|
2017-01-24 06:58:22 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-17 21:32:04 +02:00
|
|
|
template("rtc_executable") {
|
|
|
|
|
executable(target_name) {
|
|
|
|
|
forward_variables_from(invoker,
|
|
|
|
|
"*",
|
|
|
|
|
[
|
|
|
|
|
"deps",
|
|
|
|
|
"configs",
|
|
|
|
|
"public_configs",
|
|
|
|
|
"suppressed_configs",
|
|
|
|
|
"visibility",
|
|
|
|
|
])
|
|
|
|
|
forward_variables_from(invoker, [ "visibility" ])
|
|
|
|
|
if (!defined(visibility)) {
|
|
|
|
|
visibility = webrtc_default_visibility
|
|
|
|
|
}
|
|
|
|
|
configs += invoker.configs
|
|
|
|
|
configs -= rtc_remove_configs
|
|
|
|
|
configs -= invoker.suppressed_configs
|
|
|
|
|
deps = invoker.deps
|
|
|
|
|
|
|
|
|
|
public_configs = [
|
|
|
|
|
rtc_common_inherited_config,
|
|
|
|
|
absl_include_config,
|
|
|
|
|
absl_define_config,
|
|
|
|
|
]
|
|
|
|
|
if (defined(testonly) && testonly) {
|
|
|
|
|
public_configs += [ absl_flags_config ]
|
|
|
|
|
}
|
|
|
|
|
if (defined(invoker.public_configs)) {
|
|
|
|
|
public_configs += invoker.public_configs
|
|
|
|
|
}
|
|
|
|
|
if (is_win) {
|
|
|
|
|
deps += [
|
|
|
|
|
# Give executables the default manifest on Windows (a no-op elsewhere).
|
|
|
|
|
"//build/win:default_exe_manifest",
|
|
|
|
|
]
|
|
|
|
|
}
|
2024-10-10 10:46:43 +02:00
|
|
|
|
|
|
|
|
# Convert abseil dependencies to //third_party/abseil-cpp:absl_full when
|
|
|
|
|
# build_with_chromium=true so that webrtc targets won't need exceptions to
|
|
|
|
|
# depend on individual absl targets.
|
|
|
|
|
# Note that //third_party/abseil-cpp:absl_full build target includes flags,
|
|
|
|
|
# but //third_party/abseil-cpp:absl target - doesn't. That allows webrtc
|
|
|
|
|
# executables, but not libraries to use absl flags.
|
|
|
|
|
if (build_with_chromium && defined(deps)) {
|
|
|
|
|
absl_dependencies =
|
|
|
|
|
filter_labels_include(deps, [ "//third_party/abseil-cpp/*" ])
|
|
|
|
|
if (absl_dependencies != []) {
|
|
|
|
|
filtered_deps =
|
|
|
|
|
filter_labels_exclude(deps, [ "//third_party/abseil-cpp/*" ])
|
|
|
|
|
deps = []
|
|
|
|
|
deps = filtered_deps
|
|
|
|
|
deps += [ "//third_party/abseil-cpp:absl_full" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-10-17 21:32:04 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
template("rtc_shared_library") {
|
|
|
|
|
shared_library(target_name) {
|
|
|
|
|
forward_variables_from(invoker,
|
|
|
|
|
"*",
|
|
|
|
|
[
|
|
|
|
|
"configs",
|
|
|
|
|
"public_configs",
|
|
|
|
|
"suppressed_configs",
|
2017-10-16 11:16:19 +02:00
|
|
|
"visibility",
|
2017-01-24 06:58:22 -08:00
|
|
|
])
|
2017-10-16 11:16:19 +02:00
|
|
|
forward_variables_from(invoker, [ "visibility" ])
|
2018-01-10 15:54:53 +00:00
|
|
|
if (!defined(visibility)) {
|
|
|
|
|
visibility = webrtc_default_visibility
|
|
|
|
|
}
|
2018-04-22 19:55:00 +02:00
|
|
|
|
|
|
|
|
# What's your poison?
|
|
|
|
|
if (defined(testonly) && testonly) {
|
|
|
|
|
assert(!defined(poisonous))
|
|
|
|
|
assert(!defined(allow_poison))
|
|
|
|
|
} else {
|
|
|
|
|
if (!defined(poisonous)) {
|
|
|
|
|
poisonous = []
|
|
|
|
|
}
|
|
|
|
|
if (!defined(allow_poison)) {
|
|
|
|
|
allow_poison = []
|
|
|
|
|
}
|
|
|
|
|
if (!defined(assert_no_deps)) {
|
|
|
|
|
assert_no_deps = []
|
|
|
|
|
}
|
|
|
|
|
if (!defined(deps)) {
|
|
|
|
|
deps = []
|
|
|
|
|
}
|
|
|
|
|
foreach(p, poisonous) {
|
|
|
|
|
deps += [ webrtc_root + ":poison_" + p ]
|
|
|
|
|
}
|
|
|
|
|
foreach(poison_type, all_poison_types) {
|
|
|
|
|
allow_dep = true
|
|
|
|
|
foreach(v, visibility) {
|
|
|
|
|
if (v == "*") {
|
|
|
|
|
allow_dep = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
foreach(p, allow_poison + poisonous) {
|
|
|
|
|
if (p == poison_type) {
|
|
|
|
|
allow_dep = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!allow_dep) {
|
|
|
|
|
assert_no_deps += [ webrtc_root + ":poison_" + poison_type ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-24 06:58:22 -08:00
|
|
|
configs += invoker.configs
|
|
|
|
|
configs -= rtc_remove_configs
|
|
|
|
|
configs -= invoker.suppressed_configs
|
Reland "Reland "Adding absl includes and defines to rtc_* templates.""
This reverts commit 759eb4f2ad7e23b65fe0b834f8ba7f580bf1a933.
Reason for revert:
The problem has been fixed in https://chromium-review.googlesource.com/1075889.
Original change's description:
> Revert "Reland "Adding absl includes and defines to rtc_* templates.""
>
> This reverts commit fae51e4c95780f59f4bedf6e01403ff86152e168.
>
> Reason for revert:
> When use_xcode_clang = true we get:
> error: unknown warning option '-Wno-unused-template'; did you mean '-Wno-unused-result'? [-Werror,-Wunknown-warning-option]
> error: unknown warning option '-Wno-zero-as-null-pointer-constant'; did you mean '-Wno-int-to-void-pointer-cast'? [-Werror,-Wunknown-warning-option]
>
>
> Original change's description:
> > Reland "Adding absl includes and defines to rtc_* templates."
> >
> > This reverts commit 8436a699a998e4fa30d97786142baad08f110d2a.
> >
> > Reason for revert:
> > New absl roll -> https://chromium-review.googlesource.com/1071468
> >
> > Original change's description:
> > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > >
> > > This reverts commit bdb0fe42bc46d190ca45fc5a6658eddbfa5eead5.
> > >
> > > Reason for revert: https://ci.chromium.org/buildbot/chromium.fyi/Jumbo%20Win%20x64/11502
> > >
> > > Original change's description:
> > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > >
> > > > This reverts commit 85cb19fec7caf558dee7a09aafabe01c5ac78f3f.
> > > >
> > > > Reason for revert: The new version of Abseil should fix the previous
> > > > issue.
> > > >
> > > > Original change's description:
> > > > > Revert "Reland "Adding absl includes and defines to rtc_* templates.""
> > > > >
> > > > > This reverts commit 9632112a16d70a146e917db4de761e6253dfc364.
> > > > >
> > > > > Reason for revert: It breaks the WebRTC roll into Chromium.
> > > > > https://chromium-review.googlesource.com/c/chromium/src/+/1061476
> > > > >
> > > > > Original change's description:
> > > > > > Reland "Adding absl includes and defines to rtc_* templates."
> > > > > >
> > > > > > This reverts commit d161eda477491b2b97fb3f26d229c625a2a0e9b8.
> > > > > >
> > > > > > Reason for revert: The problem with iOS trybots should be fixed.
> > > > > >
> > > > > > Original change's description:
> > > > > > > Revert "Adding absl includes and defines to rtc_* templates."
> > > > > > >
> > > > > > > This reverts commit 9d8f3850f4c4faad5dc5ab32ab6f2c9c43df7b6c.
> > > > > > >
> > > > > > > Reason for revert: Breaks some trybots: https://build.chromium.org/p/client.webrtc/builders/iOS64%20Release/builds/12793.
> > > > > > >
> > > > > > > Original change's description:
> > > > > > > > Adding absl includes and defines to rtc_* templates.
> > > > > > > >
> > > > > > > > This CL implicitly adds the -I compiler flag and absl macros to WebRTC
> > > > > > > > templates. In order to include absl headers using relative paths, WebRTC
> > > > > > > > needs to ensure that all its build targets are able to see absl headers.
> > > > > > > >
> > > > > > > > This can also be done with public_deps, but WebRTC is trying to avoid
> > > > > > > > it because it creates problems with other build systems. Given this
> > > > > > > > constraint, using rtc_* templates is the most reliable solution.
> > > > > > > >
> > > > > > > > Please note that rtc_* templates are adding absl includes and defines
> > > > > > > > as public_configs, this means that build targets with WebRTC targets
> > > > > > > > in their public_deps will propagate these configs following the GN
> > > > > > > > guideline.
> > > > > > > >
> > > > > > > > Bug: webrtc:8821
> > > > > > > > Change-Id: I4aa594a524f4bd045bcb3e80d76cc27f06fe01d7
> > > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/70367
> > > > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > > Cr-Commit-Position: refs/heads/master@{#22927}
> > > > > > >
> > > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > > >
> > > > > > > Change-Id: Id8e1f881c57553386566eb1970f6b9f8632cab37
> > > > > > > No-Presubmit: true
> > > > > > > No-Tree-Checks: true
> > > > > > > No-Try: true
> > > > > > > Bug: webrtc:8821
> > > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71000
> > > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > > Cr-Commit-Position: refs/heads/master@{#22928}
> > > > > >
> > > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > > >
> > > > > > Bug: webrtc:8821
> > > > > > Change-Id: I6ee2eda97bbcd4c9be25c9c4073272192b0373f8
> > > > > > Reviewed-on: https://webrtc-review.googlesource.com/71700
> > > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > > Cr-Commit-Position: refs/heads/master@{#23251}
> > > > >
> > > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > > >
> > > > > Change-Id: I61fb749797314ca514691b341c66f7f39ef45491
> > > > > No-Presubmit: true
> > > > > No-Tree-Checks: true
> > > > > No-Try: true
> > > > > Bug: webrtc:8821
> > > > > Reviewed-on: https://webrtc-review.googlesource.com/77220
> > > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > > Cr-Commit-Position: refs/heads/master@{#23264}
> > > >
> > > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > > >
> > > > # Not skipping CQ checks because original CL landed > 1 day ago.
> > > >
> > > > Bug: webrtc:8821
> > > > Change-Id: I71dea953a002a0d526949c627653bcad0c6518fc
> > > > Reviewed-on: https://webrtc-review.googlesource.com/77781
> > > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#23317}
> > >
> > > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> > >
> > > Change-Id: I6010f9264dba7bcc4e82c4f4bbfb2eca561e500e
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:8821, chromium:845158
> > > Reviewed-on: https://webrtc-review.googlesource.com/78061
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#23328}
> >
> > TBR=phoglund@webrtc.org,mbonadei@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: webrtc:8821, chromium:845158
> > Change-Id: Iebe0958012c39e1321487e5425f43904eaf5fe91
> > Reviewed-on: https://webrtc-review.googlesource.com/78705
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23403}
>
> TBR=phoglund@webrtc.org,mbonadei@webrtc.org
>
> Change-Id: I8285cf59402aa6862ea7e3ec21f885360b7050fb
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8821, chromium:845158
> Reviewed-on: https://webrtc-review.googlesource.com/79420
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23416}
TBR=phoglund@webrtc.org,mbonadei@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8821, chromium:845158
Change-Id: I18ffdb0d7be61daf0b6464c68d219aa352f42dde
Reviewed-on: https://webrtc-review.googlesource.com/79582
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23435}
2018-05-29 14:22:32 +00:00
|
|
|
public_configs = [
|
|
|
|
|
rtc_common_inherited_config,
|
|
|
|
|
absl_include_config,
|
|
|
|
|
absl_define_config,
|
|
|
|
|
]
|
2019-07-18 13:44:12 +02:00
|
|
|
if (defined(testonly) && testonly) {
|
|
|
|
|
public_configs += [ absl_flags_config ]
|
|
|
|
|
}
|
2017-01-24 06:58:22 -08:00
|
|
|
if (defined(invoker.public_configs)) {
|
|
|
|
|
public_configs += invoker.public_configs
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-02-14 04:58:56 -08:00
|
|
|
|
2022-04-08 18:23:14 +09:00
|
|
|
if (is_mac || is_ios) {
|
|
|
|
|
template("apple_framework_bundle_with_umbrella_header") {
|
2018-01-15 13:31:03 +01:00
|
|
|
forward_variables_from(invoker, [ "output_name" ])
|
2020-10-17 07:49:28 +09:00
|
|
|
this_target_name = target_name
|
2018-01-15 13:31:03 +01:00
|
|
|
umbrella_header_path =
|
2020-10-17 07:49:28 +09:00
|
|
|
"$target_gen_dir/$output_name.framework/WebRTC/$output_name.h"
|
2022-04-08 18:23:14 +09:00
|
|
|
modulemap_path = "$target_gen_dir/Modules/module.modulemap"
|
2024-04-30 17:14:18 +09:00
|
|
|
privacy_manifest_path = "$target_gen_dir/$target_name/PrivacyInfo.xcprivacy"
|
2020-10-17 07:49:28 +09:00
|
|
|
|
|
|
|
|
action_foreach("create_bracket_include_headers_$target_name") {
|
|
|
|
|
script = "//tools_webrtc/apple/copy_framework_header.py"
|
|
|
|
|
sources = invoker.sources
|
|
|
|
|
output_name = invoker.output_name
|
|
|
|
|
outputs = [
|
|
|
|
|
"$target_gen_dir/$output_name.framework/WebRTC/{{source_file_part}}",
|
|
|
|
|
]
|
|
|
|
|
args = [
|
|
|
|
|
"--input",
|
|
|
|
|
"{{source}}",
|
|
|
|
|
"--output",
|
|
|
|
|
rebase_path(target_gen_dir, root_build_dir) +
|
|
|
|
|
"/$output_name.framework/WebRTC/{{source_file_part}}",
|
|
|
|
|
]
|
|
|
|
|
}
|
2018-01-15 13:31:03 +01:00
|
|
|
|
2022-04-08 18:23:14 +09:00
|
|
|
if (is_mac) {
|
|
|
|
|
mac_framework_bundle(target_name) {
|
|
|
|
|
forward_variables_from(invoker, "*", [ "configs" ])
|
|
|
|
|
if (defined(invoker.configs)) {
|
|
|
|
|
configs += invoker.configs
|
|
|
|
|
}
|
2018-01-15 13:31:03 +01:00
|
|
|
|
2022-04-08 18:23:14 +09:00
|
|
|
framework_version = "A"
|
|
|
|
|
framework_contents = [
|
|
|
|
|
"Headers",
|
|
|
|
|
"Modules",
|
|
|
|
|
"Resources",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
|
"-all_load",
|
|
|
|
|
"-install_name",
|
|
|
|
|
"@rpath/$output_name.framework/$output_name",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
deps += [
|
|
|
|
|
":copy_framework_headers_$this_target_name",
|
|
|
|
|
":copy_modulemap_$this_target_name",
|
2024-04-30 17:14:18 +09:00
|
|
|
":copy_privacy_manifest_$this_target_name",
|
2022-04-08 18:23:14 +09:00
|
|
|
":copy_umbrella_header_$this_target_name",
|
|
|
|
|
":create_bracket_include_headers_$this_target_name",
|
|
|
|
|
":modulemap_$this_target_name",
|
|
|
|
|
":umbrella_header_$this_target_name",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (is_ios) {
|
|
|
|
|
ios_framework_bundle(target_name) {
|
|
|
|
|
forward_variables_from(invoker,
|
|
|
|
|
"*",
|
|
|
|
|
[
|
|
|
|
|
"configs",
|
|
|
|
|
"public_headers",
|
|
|
|
|
])
|
|
|
|
|
if (defined(invoker.configs)) {
|
|
|
|
|
configs += invoker.configs
|
|
|
|
|
}
|
|
|
|
|
public_headers = get_target_outputs(
|
|
|
|
|
":create_bracket_include_headers_$this_target_name")
|
2018-01-15 13:31:03 +01:00
|
|
|
|
2022-04-08 18:23:14 +09:00
|
|
|
deps += [
|
2024-04-30 17:14:18 +09:00
|
|
|
":copy_privacy_manifest_$this_target_name",
|
2022-04-08 18:23:14 +09:00
|
|
|
":copy_umbrella_header_$this_target_name",
|
|
|
|
|
":create_bracket_include_headers_$this_target_name",
|
|
|
|
|
]
|
|
|
|
|
}
|
2018-01-15 13:31:03 +01:00
|
|
|
}
|
|
|
|
|
|
2022-04-08 18:23:14 +09:00
|
|
|
if (is_mac || target_environment == "catalyst") {
|
2021-07-06 12:16:41 -07:00
|
|
|
# Catalyst frameworks use the same layout as regular Mac frameworks.
|
|
|
|
|
headers_dir = "Versions/A/Headers"
|
2024-04-30 17:14:18 +09:00
|
|
|
|
|
|
|
|
# The path to the privacy manifest file differs between Mac and iOS.
|
|
|
|
|
# https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/adding_a_privacy_manifest_to_your_app_or_third-party_sdk
|
|
|
|
|
privacy_manifest_out_path = "Versions/A/Resources/PrivacyInfo.xcprivacy"
|
2021-07-06 12:16:41 -07:00
|
|
|
} else {
|
|
|
|
|
headers_dir = "Headers"
|
2024-04-30 17:14:18 +09:00
|
|
|
privacy_manifest_out_path = "PrivacyInfo.xcprivacy"
|
2021-07-06 12:16:41 -07:00
|
|
|
}
|
2020-10-17 07:49:28 +09:00
|
|
|
|
2018-09-06 15:48:17 +02:00
|
|
|
bundle_data("copy_framework_headers_$this_target_name") {
|
2020-10-17 07:49:28 +09:00
|
|
|
sources = get_target_outputs(
|
|
|
|
|
":create_bracket_include_headers_$this_target_name")
|
2018-09-05 16:29:27 +02:00
|
|
|
|
2020-01-21 12:10:10 +01:00
|
|
|
outputs = [ "{{bundle_contents_dir}}/Headers/{{source_file_part}}" ]
|
2020-10-17 07:49:28 +09:00
|
|
|
deps = [ ":create_bracket_include_headers_$this_target_name" ]
|
2018-09-05 16:29:27 +02:00
|
|
|
}
|
|
|
|
|
|
2018-10-02 16:08:25 -04:00
|
|
|
action("modulemap_$this_target_name") {
|
|
|
|
|
script = "//tools_webrtc/ios/generate_modulemap.py"
|
|
|
|
|
args = [
|
|
|
|
|
"--out",
|
|
|
|
|
rebase_path(modulemap_path, root_build_dir),
|
|
|
|
|
"--name",
|
|
|
|
|
output_name,
|
|
|
|
|
]
|
2020-01-21 12:10:10 +01:00
|
|
|
outputs = [ modulemap_path ]
|
2018-10-02 16:08:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bundle_data("copy_modulemap_$this_target_name") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ modulemap_path ]
|
|
|
|
|
outputs = [ "{{bundle_contents_dir}}/Modules/module.modulemap" ]
|
|
|
|
|
deps = [ ":modulemap_$this_target_name" ]
|
2018-10-02 16:08:25 -04:00
|
|
|
}
|
|
|
|
|
|
2018-09-06 15:48:17 +02:00
|
|
|
action("umbrella_header_$this_target_name") {
|
2020-10-17 07:49:28 +09:00
|
|
|
sources = get_target_outputs(
|
|
|
|
|
":create_bracket_include_headers_$this_target_name")
|
2018-09-05 16:29:27 +02:00
|
|
|
|
|
|
|
|
script = "//tools_webrtc/ios/generate_umbrella_header.py"
|
|
|
|
|
|
2020-01-21 12:10:10 +01:00
|
|
|
outputs = [ umbrella_header_path ]
|
2018-09-05 16:29:27 +02:00
|
|
|
args = [
|
|
|
|
|
"--out",
|
|
|
|
|
rebase_path(umbrella_header_path, root_build_dir),
|
|
|
|
|
"--sources",
|
|
|
|
|
] + sources
|
2020-10-17 07:49:28 +09:00
|
|
|
deps = [ ":create_bracket_include_headers_$this_target_name" ]
|
2018-09-05 16:29:27 +02:00
|
|
|
}
|
|
|
|
|
|
2022-04-08 18:23:14 +09:00
|
|
|
copy("copy_umbrella_header_$target_name") {
|
2020-01-21 12:10:10 +01:00
|
|
|
sources = [ umbrella_header_path ]
|
2022-04-08 18:23:14 +09:00
|
|
|
outputs =
|
|
|
|
|
[ "$root_out_dir/$output_name.framework/$headers_dir/$output_name.h" ]
|
2018-09-05 16:29:27 +02:00
|
|
|
|
2022-04-08 18:23:14 +09:00
|
|
|
deps = [ ":umbrella_header_$target_name" ]
|
2018-09-05 16:29:27 +02:00
|
|
|
}
|
2024-04-30 17:14:18 +09:00
|
|
|
|
|
|
|
|
action("create_privacy_manifest_$target_name") {
|
|
|
|
|
script = "//tools_webrtc/apple/generate_privacy_manifest.py"
|
|
|
|
|
|
|
|
|
|
args = [
|
|
|
|
|
"--output",
|
|
|
|
|
rebase_path(privacy_manifest_path),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
outputs = [ privacy_manifest_path ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
copy("copy_privacy_manifest_$target_name") {
|
|
|
|
|
sources = [ privacy_manifest_path ]
|
|
|
|
|
outputs =
|
|
|
|
|
[ "$root_out_dir/$output_name.framework/$privacy_manifest_out_path" ]
|
|
|
|
|
|
|
|
|
|
deps = [ ":create_privacy_manifest_$target_name" ]
|
|
|
|
|
}
|
2018-09-05 16:29:27 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-07 15:36:33 +00:00
|
|
|
if (is_android) {
|
|
|
|
|
template("rtc_android_library") {
|
|
|
|
|
android_library(target_name) {
|
|
|
|
|
forward_variables_from(invoker,
|
|
|
|
|
"*",
|
|
|
|
|
[
|
|
|
|
|
"configs",
|
|
|
|
|
"public_configs",
|
|
|
|
|
"suppressed_configs",
|
|
|
|
|
"visibility",
|
|
|
|
|
])
|
|
|
|
|
|
2018-03-20 16:32:49 +01:00
|
|
|
# Add any arguments defined by the invoker.
|
2018-11-23 17:29:44 +01:00
|
|
|
if (defined(invoker.errorprone_args)) {
|
2025-01-20 11:29:38 -05:00
|
|
|
errorprone_args = invoker.errorprone_args
|
2018-03-20 16:32:49 +01:00
|
|
|
}
|
2017-11-07 15:36:33 +00:00
|
|
|
|
2020-06-03 21:23:41 +02:00
|
|
|
not_needed([ "android_manifest" ])
|
2017-11-07 15:36:33 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template("rtc_android_apk") {
|
|
|
|
|
android_apk(target_name) {
|
|
|
|
|
forward_variables_from(invoker,
|
|
|
|
|
"*",
|
|
|
|
|
[
|
|
|
|
|
"configs",
|
|
|
|
|
"public_configs",
|
|
|
|
|
"suppressed_configs",
|
|
|
|
|
"visibility",
|
|
|
|
|
])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
template("rtc_instrumentation_test_apk") {
|
|
|
|
|
instrumentation_test_apk(target_name) {
|
|
|
|
|
forward_variables_from(invoker,
|
|
|
|
|
"*",
|
|
|
|
|
[
|
|
|
|
|
"configs",
|
|
|
|
|
"public_configs",
|
|
|
|
|
"suppressed_configs",
|
|
|
|
|
"visibility",
|
|
|
|
|
])
|
2025-02-13 09:22:25 +00:00
|
|
|
deps += [ "//third_party/jni_zero:jni_zero_java" ]
|
2017-11-07 15:36:33 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|