[arch-commits] Commit in libwebrtc/repos (8 files)
Frederik Schwan
freswa at archlinux.org
Mon Aug 17 21:49:01 UTC 2020
Date: Monday, August 17, 2020 @ 21:49:01
Author: freswa
Revision: 683369
archrelease: copy trunk to community-testing-x86_64
Added:
libwebrtc/repos/community-testing-x86_64/
libwebrtc/repos/community-testing-x86_64/PKGBUILD
(from rev 683368, libwebrtc/trunk/PKGBUILD)
libwebrtc/repos/community-testing-x86_64/args.gn
(from rev 683368, libwebrtc/trunk/args.gn)
libwebrtc/repos/community-testing-x86_64/build.diff
(from rev 683368, libwebrtc/trunk/build.diff)
libwebrtc/repos/community-testing-x86_64/gclient-conf
(from rev 683368, libwebrtc/trunk/gclient-conf)
libwebrtc/repos/community-testing-x86_64/libsrtp.diff
(from rev 683368, libwebrtc/trunk/libsrtp.diff)
libwebrtc/repos/community-testing-x86_64/src.diff
(from rev 683368, libwebrtc/trunk/src.diff)
libwebrtc/repos/community-testing-x86_64/third_party.diff
(from rev 683368, libwebrtc/trunk/third_party.diff)
------------------+
PKGBUILD | 59 ++++
args.gn | 28 ++
build.diff | 139 ++++++++++
gclient-conf | 11
libsrtp.diff | 14 +
src.diff | 709 +++++++++++++++++++++++++++++++++++++++++++++++++++++
third_party.diff | 75 +++++
7 files changed, 1035 insertions(+)
Copied: libwebrtc/repos/community-testing-x86_64/PKGBUILD (from rev 683368, libwebrtc/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2020-08-17 21:49:01 UTC (rev 683369)
@@ -0,0 +1,59 @@
+# Maintainer: Frederik Schwan <freswa at archlinux dot org>
+
+pkgname=libwebrtc
+_commit=18721df
+pkgver=83.git1.${_commit}
+pkgrel=1
+pkgdesc='WebRTC library - static linked'
+arch=('x86_64')
+url='https://webrtc.org/?hl=de'
+license=('custom:BSD')
+makedepends=('git' 'gn' 'ninja' 'unzip' 'python2' 'python' 'libxrandr' 'libxcomposite' 'openssl' 'glibc' 'ffmpeg' 'libva')
+options=('staticlibs')
+source=("webrtc::git+https://github.com/open-webrtc-toolkit/owt-deps-webrtc#commit=${_commit}"
+ 'https://storage.googleapis.com/chrome-infra/depot_tools.zip'
+ gclient-conf
+ args.gn
+ src.diff
+ build.diff
+ third_party.diff
+ libsrtp.diff)
+noextract=('depot_tools.zip')
+b2sums=('SKIP'
+ 'c931652e11cc81db2cf7b8f547c72dbea2cc1fe1a11b01eae0af677fab91a48ba0339265eda110a4f3f53f859d1bdb520576a534600a582d5dc93979acf3f606'
+ '25ab3e116e2f241219fe31e96166e009a233813417c6901ed3ff0cafcdc7b6bff17ae284167164028203e4a5e94548deff3e4bad00aff6c8286bd7d63cb9cdb2'
+ '235560d3bf6c1023398eb53051f2fde522501c939105d100d0091a832909f0ffe7e4e98068a4ec3f2ee790994e904be7e35c12fdfe9020862fb2a0c8f32209e1'
+ '923a626e69c819e550e1681257e1fb0c5c2a64160b13bd5d5a322125cba58020ba84330c8056d94a23175090055686916860d083adea08f8c8bff9e5e0ebbe01'
+ 'f8af81b249989296402e8ab9fa999559b8c9e18ac78c64766554db44289fe16778795a7ce4cd902b13f6ee9aa4866e8ae112af617a32f069674eec659c84a54a'
+ 'c8cbe2395066cdb639fd9cc8242ae345e4d4e2dabb3803397f162b26a0dfd170ddb888474e85c65fd2142a3462c984164fac0bc061f163128aad92d350be26ab'
+ 'fb6d9de8c49667e3726f255aabe8840a60e73d0d3a2ea5fd539580cc7aa734a2486267b00a236e0114adfd852a0710833b729c153761097668fdf7f6d755de94')
+
+prepare() {
+ mv webrtc src
+ unzip depot_tools.zip -d depot_tools
+ mv gclient-conf .gclient
+ DEPOT_TOOLS_UPDATE=0 "${srcdir}"/depot_tools/gclient sync --no-history
+ cd src
+ patch -Np1 < "${srcdir}"/src.diff
+ cd build
+ patch -Np1 < "${srcdir}"/build.diff
+ cd ../third_party
+ patch -Np1 < "${srcdir}"/third_party.diff
+ cd libsrtp
+ patch -Np1 < "${srcdir}"/libsrtp.diff
+ cd ../..
+ mkdir out/Release
+ cp "${srcdir}"/args.gn out/Release/args.gn
+
+ gn gen out/Release
+}
+
+build() {
+ cd src
+ ninja -C out/Release webrtc
+}
+
+package() {
+ install -Dm644 -t "${pkgdir}"/usr/lib/ "${srcdir}"/src/out/Release/obj/${pkgname}.a
+ install -Dm644 -t "${pkgdir}"/usr/share/licenses/libwebrtc/ "${srcdir}"/src/LICENSE
+}
Copied: libwebrtc/repos/community-testing-x86_64/args.gn (from rev 683368, libwebrtc/trunk/args.gn)
===================================================================
--- community-testing-x86_64/args.gn (rev 0)
+++ community-testing-x86_64/args.gn 2020-08-17 21:49:01 UTC (rev 683369)
@@ -0,0 +1,28 @@
+host_cpu="x64"
+target_os="linux"
+is_component_build=false
+is_debug=false
+is_clang=false
+symbol_level=2
+proprietary_codecs=true
+use_custom_libcxx=true
+use_system_libjpeg=true
+use_rtti=true
+use_gold=false
+use_sysroot=false
+linux_use_bundled_binutils=false
+enable_dsyms=false
+rtc_include_tests=false
+rtc_build_examples=false
+rtc_build_tools=false
+rtc_build_opus=false
+rtc_build_ssl=false
+rtc_ssl_root="/usr/include/openssl/"
+rtc_ssl_libs=["/usr/lib/libssl.so","/usr/lib/libcrypto.so","/usr/lib/libdl.so","/usr/lib/libpthread.so"]
+rtc_builtin_ssl_root_certificates=true
+rtc_build_ffmpeg=false
+rtc_ffmpeg_root="../../../ffmpeg"
+rtc_ffmpeg_libs=["/usr/lib/libavfilter.so","/usr/lib/libswscale.so","/usr/lib/libswresample.so","/usr/lib/libavutil.so","/usr/lib/libva-x11.so","/usr/lib/libva-drm.so","/usr/lib/libva.so","/usr/lib/libvdpau.so","/usr/lib/libdrm.so","/usr/lib/libXfixes.so","/usr/lib/libXext.so","/usr/lib/libX11.so","/usr/lib/libxcb.so","/usr/lib/libXau.so","/usr/lib/libXdmcp.so","/usr/lib/libdbus-1.so"]
+rtc_opus_root="/usr/include/opus"
+rtc_enable_protobuf=false
+treat_warnings_as_errors=false
Copied: libwebrtc/repos/community-testing-x86_64/build.diff (from rev 683368, libwebrtc/trunk/build.diff)
===================================================================
--- community-testing-x86_64/build.diff (rev 0)
+++ community-testing-x86_64/build.diff 2020-08-17 21:49:01 UTC (rev 683369)
@@ -0,0 +1,139 @@
+diff --git a/config/c++/c++.gni b/config/c++/c++.gni
+index 5ced459..db1b27c 100644
+--- a/config/c++/c++.gni
++++ b/config/c++/c++.gni
+@@ -11,7 +11,7 @@ declare_args() {
+ # Don't check in changes that set this to false for more platforms; doing so
+ # is not supported.
+ use_custom_libcxx =
+- is_fuchsia || is_android || is_mac || (is_ios && !use_xcode_clang) ||
++ is_fuchsia || is_android || (is_mac && !use_xcode_clang) || (is_ios && !use_xcode_clang) ||
+ (is_win && is_clang) ||
+ (is_linux &&
+ (!is_chromeos || default_toolchain != "//build/toolchain/cros:target"))
+diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn
+index 3d5e4de..1ebe692 100644
+--- a/config/compiler/BUILD.gn
++++ b/config/compiler/BUILD.gn
+@@ -535,7 +535,7 @@ config("compiler") {
+ # Override Chromium's default for projects that wish to stay on C++11.
+ cflags_cc += [ "-std=${standard_prefix}++11" ]
+ } else {
+- cflags_cc += [ "-std=${standard_prefix}++14" ]
++ cflags_cc += [ "-std=${standard_prefix}++17" ]
+ }
+ } else if (!is_win && !is_nacl) {
+ if (target_os == "android") {
+@@ -1379,6 +1379,8 @@ config("default_warnings") {
+
+ "/wd4715", # 'function' : not all control paths return a value'
+ # MSVC does not analyze switch (enum) for completeness.
++
++ "/wd4018", # signed/unsigned mismatch in h265 codec.
+ ]
+
+ cflags_cc += [
+@@ -1480,6 +1482,7 @@ config("default_warnings") {
+ cflags += [
+ # TODO(thakis): https://crbug.com/604888
+ "-Wno-undefined-var-template",
++ "-Wno-deprecated-declarations", # 'OSAtomicCompareAndSwap32Barrier' is deprecated: first deprecated in macOS 10.12
+ ]
+
+ if (is_win) {
+@@ -1488,7 +1491,7 @@ config("default_warnings") {
+ cflags += [ "-Wno-nonportable-include-path" ]
+ }
+
+- if (current_toolchain == host_toolchain || !use_xcode_clang) {
++ if (current_toolchain == host_toolchain && !use_xcode_clang) {
+ # Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not
+ # recognize.
+ cflags += [
+@@ -1528,6 +1531,25 @@ config("default_warnings") {
+ ]
+ }
+ }
++ } else if (!is_win) {
++ cflags += [
++ "-Wno-attributes",
++ "-Wno-address",
++ "-Wno-nonnull-compare",
++ "-Wno-return-type",
++ "-Wno-dangling-else",
++ "-Wno-sequence-point",
++ "-Wno-sign-compare",
++ "-Wno-unused-but-set-variable",
++ "-Wno-int-in-bool-context",
++ "-Wno-unused-function",
++ "-Wno-parentheses",
++ ]
++ cflags_cc += [
++ "-Wno-subobject-linkage",
++ "-Wno-register",
++ "-Wno-array-bounds", # array subscript 18446744073709551615 is above array bounds of ‘const webrtc::SpatialLayer [5]’ `codec.spatialLayers[num_active_layers - 1].minBitrate);`
++ ]
+ }
+ }
+
+@@ -1660,7 +1682,7 @@ config("no_chromium_code") {
+ # suppressing them individually, we just blanket suppress them here.
+ "-Wno-unused-variable",
+ ]
+- if (!is_nacl && (current_toolchain == host_toolchain || !use_xcode_clang)) {
++ if (!is_nacl && (current_toolchain == host_toolchain && !use_xcode_clang)) {
+ cflags += [
+ # TODO(https://crbug.com/1031169): Clean up and enable.
+ "-Wno-misleading-indentation",
+diff --git a/config/gcc/BUILD.gn b/config/gcc/BUILD.gn
+index 747245f..6e35afb 100644
+--- a/config/gcc/BUILD.gn
++++ b/config/gcc/BUILD.gn
+@@ -91,7 +91,8 @@ if (is_component_build && !is_android) {
+ # Settings for executables.
+ config("executable_config") {
+ configs = executable_and_shared_library_configs_
+- ldflags = [ "-pie" ]
++ # ldflags = [ "-pie" ]
++ ldflags = []
+ if (is_android) {
+ ldflags += [
+ "-Bdynamic",
+diff --git a/config/linux/gtk/gtk.gni b/config/linux/gtk/gtk.gni
+index 0a3f35d..b23571a 100644
+--- a/config/linux/gtk/gtk.gni
++++ b/config/linux/gtk/gtk.gni
+@@ -12,4 +12,4 @@ declare_args() {
+ gtk_version = 3
+ }
+
+-assert(gtk_version >= 3 && gtk_version <= 4)
++assert(gtk_version >= 2 && gtk_version <= 4)
+diff --git a/toolchain/mac/BUILD.gn b/toolchain/mac/BUILD.gn
+index 08b17ff..7661885 100644
+--- a/toolchain/mac/BUILD.gn
++++ b/toolchain/mac/BUILD.gn
+@@ -86,7 +86,7 @@ template("mac_toolchain") {
+
+ # Supports building with the version of clang shipped with Xcode when
+ # targeting iOS by not respecting clang_base_path.
+- if (toolchain_args.current_os == "ios" && use_xcode_clang) {
++ if (use_xcode_clang) {
+ prefix = ""
+ } else {
+ prefix = rebase_path("$clang_base_path/bin/", root_build_dir)
+diff --git a/toolchain/toolchain.gni b/toolchain/toolchain.gni
+index 552ceb6..71f2f64 100644
+--- a/toolchain/toolchain.gni
++++ b/toolchain/toolchain.gni
+@@ -45,8 +45,8 @@ declare_args() {
+ # Check target_os here instead of is_ios as this file is loaded for secondary
+ # toolchain (host toolchain in particular) but the argument is the same for
+ # all toolchains.
+-assert(!use_xcode_clang || target_os == "ios",
+- "Using Xcode's clang is only supported in iOS builds")
++# assert(!use_xcode_clang || target_os == "ios",
++# "Using Xcode's clang is only supported in iOS builds")
+
+ # Extension for shared library files (including leading dot).
+ if (is_mac || is_ios) {
Copied: libwebrtc/repos/community-testing-x86_64/gclient-conf (from rev 683368, libwebrtc/trunk/gclient-conf)
===================================================================
--- community-testing-x86_64/gclient-conf (rev 0)
+++ community-testing-x86_64/gclient-conf 2020-08-17 21:49:01 UTC (rev 683369)
@@ -0,0 +1,11 @@
+solutions = [
+ {
+ "managed": False,
+ "name": "src",
+ "url": "https://github.com/open-webrtc-toolkit/owt-deps-webrtc.git",
+ "custom_deps": {},
+ "deps_file": "DEPS",
+ "safesync_url": "",
+ },
+]
+target_os = []
Copied: libwebrtc/repos/community-testing-x86_64/libsrtp.diff (from rev 683368, libwebrtc/trunk/libsrtp.diff)
===================================================================
--- community-testing-x86_64/libsrtp.diff (rev 0)
+++ community-testing-x86_64/libsrtp.diff 2020-08-17 21:49:01 UTC (rev 683369)
@@ -0,0 +1,14 @@
+diff --git a/BUILD.gn b/BUILD.gn
+index 6359585..0c9d2ff 100644
+--- a/BUILD.gn
++++ b/BUILD.gn
+@@ -114,9 +115,6 @@ static_library("libsrtp") {
+ "srtp/ekt.c",
+ "srtp/srtp.c",
+ ]
+- public_deps = [
+- "//third_party/boringssl:boringssl",
+- ]
+ }
+
+ if (build_libsrtp_tests) {
Copied: libwebrtc/repos/community-testing-x86_64/src.diff (from rev 683368, libwebrtc/trunk/src.diff)
===================================================================
--- community-testing-x86_64/src.diff (rev 0)
+++ community-testing-x86_64/src.diff 2020-08-17 21:49:01 UTC (rev 683369)
@@ -0,0 +1,709 @@
+diff --git a/BUILD.gn b/BUILD.gn
+index 5fe6f84..719626d 100644
+--- a/BUILD.gn
++++ b/BUILD.gn
+@@ -335,7 +335,7 @@ config("common_config") {
+ "-Wnon-virtual-dtor",
+
+ # This is enabled for clang; enable for gcc as well.
+- "-Woverloaded-virtual",
++ # "-Woverloaded-virtual", # a lot of such errors when compiling with g++.
+ ]
+ }
+
+@@ -445,9 +445,9 @@ if (!build_with_chromium) {
+ ":webrtc_lib_link_test",
+ ]
+
+- if (build_with_owt) {
+- visibility += [ "//talk/owt" ]
+- }
++ # if (build_with_owt) {
++ # visibility += [ "//talk/owt" ]
++ # }
+ sources = []
+ complete_static_lib = true
+ suppressed_configs += [ "//build/config/compiler:thin_archive" ]
+diff --git a/api/test/video/BUILD.gn b/api/test/video/BUILD.gn
+index 4ebb0c9..a4a0d7b 100644
+--- a/api/test/video/BUILD.gn
++++ b/api/test/video/BUILD.gn
+@@ -8,7 +8,7 @@
+
+ import("../../../webrtc.gni")
+
+-rtc_library("function_video_factory") {
++rtc_source_set("function_video_factory") {
+ visibility = [ "*" ]
+ testonly = true
+ public = [
+diff --git a/audio/utility/channel_mixer.cc b/audio/utility/channel_mixer.cc
+index 8867a3e..4bd3662 100644
+--- a/audio/utility/channel_mixer.cc
++++ b/audio/utility/channel_mixer.cc
+@@ -10,6 +10,8 @@
+
+ #include "audio/utility/channel_mixer.h"
+
++#include <cstring> // fix build with -std=gnu++17
++
+ #include "audio/utility/channel_mixing_matrix.h"
+ #include "rtc_base/checks.h"
+ #include "rtc_base/logging.h"
+diff --git a/build_overrides/build.gni b/build_overrides/build.gni
+index 6025cdd..a9f63f0 100644
+--- a/build_overrides/build.gni
++++ b/build_overrides/build.gni
+@@ -16,6 +16,8 @@ linux_use_bundled_binutils_override = true
+ # only needed to support both WebRTC standalone and Chromium builds.
+ build_with_chromium = false
+
++build_with_owt = false
++
+ # Use our own suppressions files.
+ asan_suppressions_file = "//build/sanitizers/asan_suppressions.cc"
+ lsan_suppressions_file = "//tools_webrtc/sanitizers/lsan_suppressions_webrtc.cc"
+@@ -35,7 +37,7 @@ lint_suppressions_file = "//tools_webrtc/android/suppressions.xml"
+ # so we just ignore that assert. See https://crbug.com/648948 for more info.
+ ignore_elf32_limitations = true
+
+-if (is_win || is_ios || is_android) {
++if (is_win || is_ios || is_android || is_mac || is_linux) {
+ rtc_use_h265 = true
+ } else {
+ rtc_use_h265 = false
+diff --git a/examples/BUILD.gn b/examples/BUILD.gn
+index 4fd2d70..217f520 100644
+--- a/examples/BUILD.gn
++++ b/examples/BUILD.gn
+@@ -232,7 +232,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) {
+ # iOS must use WebRTC.framework which is dynamically linked.
+ deps = [ "../sdk:framework_objc+link" ]
+ } else {
+- deps = [ "../sdk:mac_framework_objc+link" ]
++ deps = [ "../sdk:mac_framework_objc_static" ]
+ }
+ }
+
+@@ -301,7 +301,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) {
+ "../sdk:ios_framework_bundle",
+ ]
+ } else {
+- deps += [ "../sdk:mac_framework_objc+link" ]
++ deps += [ "../sdk:mac_framework_objc_static" ]
+ }
+ libs = [
+ "CoreMedia.framework",
+@@ -528,7 +528,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) {
+ deps = [
+ ":apprtc_common",
+ ":apprtc_signaling",
+- "../sdk:mac_framework_objc+link",
++ "../sdk:mac_framework_objc_static",
+ ]
+ }
+
+@@ -551,8 +551,8 @@ if (is_ios || (is_mac && target_cpu != "x86")) {
+
+ deps = [
+ ":AppRTCMobile_lib",
+- "../sdk:mac_framework_bundle",
+- "../sdk:mac_framework_objc+link",
++ # "../sdk:mac_framework_bundle",
++ "../sdk:mac_framework_objc_static",
+ ]
+ }
+ }
+diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn
+index ceee0c0..8c4f00d 100644
+--- a/modules/audio_coding/BUILD.gn
++++ b/modules/audio_coding/BUILD.gn
+@@ -763,6 +763,8 @@ rtc_library("webrtc_opus") {
+ public_deps += [ rtc_opus_dir ] # no-presubmit-check TODO(webrtc:8603)
+ } else if (build_with_mozilla) {
+ include_dirs = [ "/media/libopus/include" ]
++ } else {
++ public_configs = [ "../../rtc_base:external_opus_library" ]
+ }
+ }
+
+@@ -801,6 +803,8 @@ rtc_library("webrtc_multiopus") {
+ public_deps += [ rtc_opus_dir ]
+ } else if (build_with_mozilla) {
+ include_dirs = [ "/media/libopus/include" ]
++ } else {
++ public_configs = [ "../../rtc_base:external_opus_library" ]
+ }
+ }
+
+@@ -818,6 +822,8 @@ rtc_library("webrtc_opus_wrapper") {
+ public_deps = [ rtc_opus_dir ] # no-presubmit-check TODO(webrtc:8603)
+ } else if (build_with_mozilla) {
+ include_dirs = [ getenv("DIST") + "/include/opus" ]
++ } else {
++ public_configs = [ "../../rtc_base:external_opus_library" ]
+ }
+
+ deps = [
+diff --git a/modules/audio_device/audio_device_buffer.cc b/modules/audio_device/audio_device_buffer.cc
+index 336846e..f0c388b 100644
+--- a/modules/audio_device/audio_device_buffer.cc
++++ b/modules/audio_device/audio_device_buffer.cc
+@@ -456,7 +456,7 @@ void AudioDeviceBuffer::LogStats(LogState state) {
+ }
+ last_stats_ = stats;
+
+- int64_t time_to_wait_ms = next_callback_time - rtc::TimeMillis();
++ int64_t time_to_wait_ms = std::max(next_callback_time - rtc::TimeMillis(), int64_t(1));
+ RTC_DCHECK_GT(time_to_wait_ms, 0) << "Invalid timer interval";
+
+ // Keep posting new (delayed) tasks until state is changed to kLogStop.
+diff --git a/modules/audio_processing/aec3/reverb_model_estimator.h b/modules/audio_processing/aec3/reverb_model_estimator.h
+index 3b9971a..efc2912 100644
+--- a/modules/audio_processing/aec3/reverb_model_estimator.h
++++ b/modules/audio_processing/aec3/reverb_model_estimator.h
+@@ -13,6 +13,7 @@
+
+ #include <array>
+ #include <vector>
++#include <memory> // fix build with -std=gnu++17
+
+ #include "absl/types/optional.h"
+ #include "api/array_view.h"
+diff --git a/modules/utility/BUILD.gn b/modules/utility/BUILD.gn
+index 8710ed4..2a8fa4e 100644
+--- a/modules/utility/BUILD.gn
++++ b/modules/utility/BUILD.gn
+@@ -40,7 +40,7 @@ rtc_library("utility") {
+ ]
+ }
+
+-rtc_library("mock_process_thread") {
++rtc_source_set("mock_process_thread") {
+ testonly = true
+ visibility = [ "*" ]
+ sources = [ "include/mock/mock_process_thread.h" ]
+diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
+index 2f9d257..65130a8 100644
+--- a/modules/video_coding/BUILD.gn
++++ b/modules/video_coding/BUILD.gn
+@@ -370,10 +370,13 @@ rtc_library("webrtc_h264") {
+ ]
+
+ if (rtc_use_h264) {
+- deps += [
+- "//third_party/ffmpeg",
+- "//third_party/openh264:encoder",
+- ]
++ deps += [ "//third_party/openh264:encoder" ]
++ if (rtc_build_ffmpeg) {
++ deps += [ "//third_party/ffmpeg" ]
++ } else {
++ configs += [ "../../rtc_base:external_ffmpeg_library" ]
++ all_dependent_configs = [ "../../rtc_base:external_ffmpeg_linking" ]
++ }
+ if (!build_with_mozilla) {
+ deps += [ "../../media:rtc_media_base" ]
+ }
+diff --git a/modules/video_coding/codecs/h264/h264_color_space.h b/modules/video_coding/codecs/h264/h264_color_space.h
+index aec76ef..918ea26 100644
+--- a/modules/video_coding/codecs/h264/h264_color_space.h
++++ b/modules/video_coding/codecs/h264/h264_color_space.h
+@@ -19,7 +19,7 @@
+ #include "api/video/color_space.h"
+
+ extern "C" {
+-#include "third_party/ffmpeg/libavcodec/avcodec.h"
++#include <libavcodec/avcodec.h>
+ } // extern "C"
+
+ namespace webrtc {
+diff --git a/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+index 6725a3b..a7e837c 100644
+--- a/modules/video_coding/codecs/h264/h264_decoder_impl.cc
++++ b/modules/video_coding/codecs/h264/h264_decoder_impl.cc
+@@ -21,9 +21,9 @@
+ #include <memory>
+
+ extern "C" {
+-#include "third_party/ffmpeg/libavcodec/avcodec.h"
+-#include "third_party/ffmpeg/libavformat/avformat.h"
+-#include "third_party/ffmpeg/libavutil/imgutils.h"
++#include <libavcodec/avcodec.h>
++#include <libavformat/avformat.h>
++#include <libavutil/imgutils.h>
+ } // extern "C"
+
+ #include "api/video/color_space.h"
+diff --git a/modules/video_coding/codecs/h264/h264_decoder_impl.h b/modules/video_coding/codecs/h264/h264_decoder_impl.h
+index 80892de..70f34fb 100644
+--- a/modules/video_coding/codecs/h264/h264_decoder_impl.h
++++ b/modules/video_coding/codecs/h264/h264_decoder_impl.h
+@@ -36,7 +36,7 @@
+ // passed to ffmpeg.
+
+ extern "C" {
+-#include "third_party/ffmpeg/libavcodec/avcodec.h"
++#include <libavcodec/avcodec.h>
+ } // extern "C"
+
+ #include "common_video/h264/h264_bitstream_parser.h"
+diff --git a/modules/video_coding/utility/ivf_file_reader.cc b/modules/video_coding/utility/ivf_file_reader.cc
+index 9667bb7..6fe4e88 100644
+--- a/modules/video_coding/utility/ivf_file_reader.cc
++++ b/modules/video_coding/utility/ivf_file_reader.cc
+@@ -12,6 +12,7 @@
+
+ #include <string>
+ #include <vector>
++#include <cstring> // fix build with -std=gnu++17
+
+ #include "api/video_codecs/video_codec.h"
+ #include "modules/rtp_rtcp/source/byte_io.h"
+diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn
+index ae49deb..af19241 100644
+--- a/p2p/BUILD.gn
++++ b/p2p/BUILD.gn
+@@ -118,7 +118,7 @@ rtc_library("rtc_p2p") {
+ }
+
+ if (rtc_include_tests) {
+- rtc_library("fake_ice_transport") {
++ rtc_source_set("fake_ice_transport") {
+ testonly = true
+ visibility = [ "*" ]
+ sources = [ "base/fake_ice_transport.h" ]
+@@ -132,7 +132,7 @@ if (rtc_include_tests) {
+ ]
+ }
+
+- rtc_library("fake_port_allocator") {
++ rtc_source_set("fake_port_allocator") {
+ testonly = true
+ visibility = [ "*" ]
+ sources = [ "base/fake_port_allocator.h" ]
+diff --git a/p2p/base/basic_ice_controller.cc b/p2p/base/basic_ice_controller.cc
+index aa20025..506bf5c 100644
+--- a/p2p/base/basic_ice_controller.cc
++++ b/p2p/base/basic_ice_controller.cc
+@@ -195,7 +195,7 @@ const Connection* BasicIceController::FindNextPingableConnection() {
+ if (conn1 == conn2) {
+ return false;
+ }
+- return MorePingable(conn1, conn2) == conn2;
++ return MorePingable(std::min(conn1, conn2), std::max(conn1, conn2)) == conn2;
+ });
+ if (iter != pingable_connections.end()) {
+ return *iter;
+diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
+index d078482..a1bb711 100644
+--- a/rtc_base/BUILD.gn
++++ b/rtc_base/BUILD.gn
+@@ -24,6 +24,35 @@ if (!rtc_build_ssl) {
+ assert(rtc_ssl_root != "",
+ "You must specify rtc_ssl_root when rtc_build_ssl==0.")
+ include_dirs = [ rtc_ssl_root ]
++ libs = rtc_ssl_libs
++ }
++}
++
++if (!rtc_build_ffmpeg) {
++ config("external_ffmpeg_linking") {
++ if (is_win && !is_clang) {
++ ldflags = [
++ "/NODEFAULTLIB:LIBCMT",
++
++ # libavcodec.a(me_cmp.o) : warning LNK4078: multiple '.rodata' sections found with different attributes (60500020)
++ "/ignore:4078",
++ ]
++ }
++ }
++ config("external_ffmpeg_library") {
++ assert(rtc_ffmpeg_root != "",
++ "You must specify rtc_ffmpeg_root when rtc_build_ffmpeg==0.")
++ include_dirs = [ rtc_ffmpeg_root ]
++ libs = rtc_ffmpeg_libs
++ }
++}
++
++if (!rtc_build_opus) {
++ config("external_opus_library") {
++ assert(rtc_opus_root != "",
++ "You must specify rtc_opus_root when rtc_build_opus==0.")
++ include_dirs = [ rtc_opus_root ]
++ libs = rtc_opus_libs
+ }
+ }
+
+@@ -1326,7 +1355,7 @@ if (rtc_include_tests) {
+ "win32_window_unittest.cc",
+ ]
+ }
+- if (is_posix || is_fuchsia) {
++ if ((is_posix || is_fuchsia) && rtc_build_ssl) {
+ sources += [
+ "openssl_adapter_unittest.cc",
+ "openssl_session_cache_unittest.cc",
+diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
+index 7588baa..81f5ccf 100644
+--- a/sdk/BUILD.gn
++++ b/sdk/BUILD.gn
+@@ -23,6 +23,8 @@ group("sdk") {
+ }
+ if (is_ios) {
+ public_deps += [ ":framework_objc" ]
++ } else if (is_mac) {
++ public_deps += [ ":mac_framework_objc_static" ]
+ }
+ }
+ }
+@@ -1399,6 +1401,107 @@ if (is_ios || is_mac) {
+ }
+
+ if (is_mac) {
++ rtc_source_set("mac_framework_objc_static") {
++ visibility = [ "*" ]
++ allow_poison = [ "software_video_codecs", "audio_codecs", "default_task_queue" ]
++ sources = [
++ "objc/api/peerconnection/RTCAudioSource.h",
++ "objc/api/peerconnection/RTCAudioTrack.h",
++ "objc/api/peerconnection/RTCCertificate.h",
++ "objc/api/peerconnection/RTCConfiguration.h",
++ "objc/api/peerconnection/RTCCryptoOptions.h",
++ "objc/api/peerconnection/RTCDataChannel.h",
++ "objc/api/peerconnection/RTCDataChannelConfiguration.h",
++ "objc/api/peerconnection/RTCDtmfSender.h",
++ "objc/api/peerconnection/RTCFieldTrials.h",
++ "objc/api/peerconnection/RTCIceCandidate.h",
++ "objc/api/peerconnection/RTCIceServer.h",
++ "objc/api/peerconnection/RTCLegacyStatsReport.h",
++ "objc/api/peerconnection/RTCMediaConstraints.h",
++ "objc/api/peerconnection/RTCMediaSource.h",
++ "objc/api/peerconnection/RTCMediaStream.h",
++ "objc/api/peerconnection/RTCMediaStreamTrack.h",
++ "objc/api/peerconnection/RTCMetrics.h",
++ "objc/api/peerconnection/RTCMetricsSampleInfo.h",
++ "objc/api/peerconnection/RTCPeerConnection.h",
++ "objc/api/peerconnection/RTCPeerConnectionFactory.h",
++ "objc/api/peerconnection/RTCPeerConnectionFactoryOptions.h",
++ "objc/api/peerconnection/RTCRtcpParameters.h",
++ "objc/api/peerconnection/RTCRtpCodecParameters.h",
++ "objc/api/peerconnection/RTCRtpEncodingParameters.h",
++ "objc/api/peerconnection/RTCRtpHeaderExtension.h",
++ "objc/api/peerconnection/RTCRtpParameters.h",
++ "objc/api/peerconnection/RTCRtpReceiver.h",
++ "objc/api/peerconnection/RTCRtpSender.h",
++ "objc/api/peerconnection/RTCRtpTransceiver.h",
++ "objc/api/peerconnection/RTCSSLAdapter.h",
++ "objc/api/peerconnection/RTCSessionDescription.h",
++ "objc/api/peerconnection/RTCTracing.h",
++ "objc/api/peerconnection/RTCVideoSource.h",
++ "objc/api/peerconnection/RTCVideoTrack.h",
++ "objc/api/video_codec/RTCVideoDecoderVP8.h",
++ "objc/api/video_codec/RTCVideoDecoderVP9.h",
++ "objc/api/video_codec/RTCVideoEncoderVP8.h",
++ "objc/api/video_codec/RTCVideoEncoderVP9.h",
++ "objc/api/video_frame_buffer/RTCNativeI420Buffer.h",
++ "objc/api/video_frame_buffer/RTCNativeMutableI420Buffer.h",
++ "objc/base/RTCCodecSpecificInfo.h",
++ "objc/base/RTCEncodedImage.h",
++ "objc/base/RTCI420Buffer.h",
++ "objc/base/RTCLogging.h",
++ "objc/base/RTCMacros.h",
++ "objc/base/RTCMutableI420Buffer.h",
++ "objc/base/RTCMutableYUVPlanarBuffer.h",
++ "objc/base/RTCRtpFragmentationHeader.h",
++ "objc/base/RTCVideoCapturer.h",
++ "objc/base/RTCVideoCodecInfo.h",
++ "objc/base/RTCVideoDecoder.h",
++ "objc/base/RTCVideoDecoderFactory.h",
++ "objc/base/RTCVideoEncoder.h",
++ "objc/base/RTCVideoEncoderFactory.h",
++ "objc/base/RTCVideoEncoderQpThresholds.h",
++ "objc/base/RTCVideoEncoderSettings.h",
++ "objc/base/RTCVideoFrame.h",
++ "objc/base/RTCVideoFrameBuffer.h",
++ "objc/base/RTCVideoRenderer.h",
++ "objc/base/RTCYUVPlanarBuffer.h",
++ "objc/components/capturer/RTCCameraVideoCapturer.h",
++ "objc/components/capturer/RTCFileVideoCapturer.h",
++ "objc/components/renderer/metal/RTCMTLNSVideoView.h",
++ "objc/components/renderer/opengl/RTCNSGLVideoView.h",
++ "objc/components/renderer/opengl/RTCVideoViewShading.h",
++ "objc/components/video_codec/RTCCodecSpecificInfoH264.h",
++ "objc/components/video_codec/RTCDefaultVideoDecoderFactory.h",
++ "objc/components/video_codec/RTCDefaultVideoEncoderFactory.h",
++ "objc/components/video_codec/RTCH264ProfileLevelId.h",
++ "objc/components/video_codec/RTCVideoDecoderFactoryH264.h",
++ "objc/components/video_codec/RTCVideoDecoderH264.h",
++ "objc/components/video_codec/RTCVideoEncoderFactoryH264.h",
++ "objc/components/video_codec/RTCVideoEncoderH264.h",
++ "objc/components/video_frame_buffer/RTCCVPixelBuffer.h",
++ "objc/helpers/RTCDispatcher.h",
++ ]
++ if (!build_with_chromium) {
++ sources += [
++ "objc/api/logging/RTCCallbackLogger.h",
++ "objc/api/peerconnection/RTCFileLogger.h",
++ ]
++ }
++
++ deps = [
++ ":base_objc",
++ ":default_codec_factory_objc",
++ ":native_api",
++ ":native_video",
++ ":videocapture_objc",
++ ":videocodec_objc",
++ ":videotoolbox_objc",
++ ]
++
++ configs += [ "..:common_objc" ]
++
++ public_configs = [ ":common_config_objc" ]
++ }
+ mac_framework_bundle_with_umbrella_header("mac_framework_objc") {
+ info_plist = "objc/Info.plist"
+ output_name = "WebRTC"
+diff --git a/sdk/objc/components/video_codec/nalu_rewriter.cc b/sdk/objc/components/video_codec/nalu_rewriter.cc
+index ddf7346..05d15f5 100644
+--- a/sdk/objc/components/video_codec/nalu_rewriter.cc
++++ b/sdk/objc/components/video_codec/nalu_rewriter.cc
+@@ -269,8 +269,14 @@ bool H265CMSampleBufferToAnnexBBuffer(
+ // Get parameter set information.
+ int nalu_header_size = 0;
+ size_t param_set_count = 0;
+- OSStatus status = CMVideoFormatDescriptionGetHEVCParameterSetAtIndex(
++ OSStatus status = noErr;
++ if (__builtin_available(macOS 10.13, *)) {
++ status = CMVideoFormatDescriptionGetHEVCParameterSetAtIndex(
+ description, 0, nullptr, nullptr, ¶m_set_count, &nalu_header_size);
++ } else {
++ RTC_LOG(LS_ERROR) << "H265 is unavailable on this system.";
++ return false;
++ }
+ if (status != noErr) {
+ RTC_LOG(LS_ERROR) << "Failed to get parameter set.";
+ return false;
+@@ -290,8 +296,13 @@ bool H265CMSampleBufferToAnnexBBuffer(
+ size_t param_set_size = 0;
+ const uint8_t* param_set = nullptr;
+ for (size_t i = 0; i < param_set_count; ++i) {
+- status = CMVideoFormatDescriptionGetHEVCParameterSetAtIndex(
++ if (__builtin_available(macOS 10.13, *)) {
++ status = CMVideoFormatDescriptionGetHEVCParameterSetAtIndex(
+ description, i, ¶m_set, ¶m_set_size, nullptr, nullptr);
++ } else {
++ RTC_LOG(LS_ERROR) << "H265 is unavailable on this system.";
++ return false;
++ }
+ if (status != noErr) {
+ RTC_LOG(LS_ERROR) << "Failed to get parameter set.";
+ return false;
+@@ -527,9 +538,15 @@ CMVideoFormatDescriptionRef CreateH265VideoFormatDescription(
+
+ // Parse the SPS and PPS into a CMVideoFormatDescription.
+ CMVideoFormatDescriptionRef description = nullptr;
+- OSStatus status = CMVideoFormatDescriptionCreateFromHEVCParameterSets(
++ OSStatus status = noErr;
++ if (__builtin_available(macOS 10.13, *)) {
++ status = CMVideoFormatDescriptionCreateFromHEVCParameterSets(
+ kCFAllocatorDefault, 3, param_set_ptrs, param_set_sizes, 4, nullptr,
+ &description);
++ } else {
++ RTC_LOG(LS_ERROR) << "H265 is unavailable on this system.";
++ return nullptr;
++ }
+ if (status != noErr) {
+ RTC_LOG(LS_ERROR) << "Failed to create video format description.";
+ return nullptr;
+diff --git a/test/BUILD.gn b/test/BUILD.gn
+index 2e22476..7d64957 100644
+--- a/test/BUILD.gn
++++ b/test/BUILD.gn
+@@ -768,7 +768,7 @@ rtc_library("encoder_settings") {
+ ]
+ }
+
+-rtc_library("rtc_expect_death") {
++rtc_source_set("rtc_expect_death") {
+ testonly = true
+ sources = [ "testsupport/rtc_expect_death.h" ]
+ deps = [ ":test_support" ]
+diff --git a/test/network/BUILD.gn b/test/network/BUILD.gn
+index fc56001..d3dd0e8 100644
+--- a/test/network/BUILD.gn
++++ b/test/network/BUILD.gn
+@@ -143,7 +143,7 @@ rtc_library("feedback_generator_unittest") {
+ ]
+ }
+
+-rtc_library("network_emulation_unittests") {
++rtc_source_set("network_emulation_unittests") {
+ testonly = true
+ deps = [
+ ":cross_traffic_unittest",
+diff --git a/test/pc/e2e/BUILD.gn b/test/pc/e2e/BUILD.gn
+index 8a5607a..8b28e64 100644
+--- a/test/pc/e2e/BUILD.gn
++++ b/test/pc/e2e/BUILD.gn
+@@ -42,7 +42,7 @@ if (rtc_include_tests) {
+ }
+ }
+
+-rtc_library("peer_connection_quality_test_params") {
++rtc_source_set("peer_connection_quality_test_params") {
+ visibility = [ "*" ]
+ testonly = true
+ sources = [ "peer_connection_quality_test_params.h" ]
+@@ -62,7 +62,7 @@ rtc_library("peer_connection_quality_test_params") {
+ ]
+ }
+
+-rtc_library("encoded_image_data_injector_api") {
++rtc_source_set("encoded_image_data_injector_api") {
+ visibility = [ "*" ]
+ testonly = true
+ sources = [ "analyzer/video/encoded_image_data_injector.h" ]
+diff --git a/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.cc b/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.cc
+index b8f1740..4de32d7 100644
+--- a/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.cc
++++ b/test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.cc
+@@ -10,6 +10,8 @@
+
+ #include "test/pc/e2e/analyzer/audio/default_audio_quality_analyzer.h"
+
++#include <cstring> // fix build with -std=gnu++17
++
+ #include "api/stats_types.h"
+ #include "rtc_base/logging.h"
+
+diff --git a/test/pc/e2e/analyzer/video/default_encoded_image_data_injector.cc b/test/pc/e2e/analyzer/video/default_encoded_image_data_injector.cc
+index 2634e6e..11d7f4b 100644
+--- a/test/pc/e2e/analyzer/video/default_encoded_image_data_injector.cc
++++ b/test/pc/e2e/analyzer/video/default_encoded_image_data_injector.cc
+@@ -12,6 +12,7 @@
+
+ #include <algorithm>
+ #include <cstddef>
++#include <cstring> // fix build with -std=gnu++17
+
+ #include "absl/memory/memory.h"
+ #include "api/video/encoded_image.h"
+diff --git a/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.cc b/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.cc
+index ec0d26b..f51d57c 100644
+--- a/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.cc
++++ b/test/pc/e2e/analyzer/video/single_process_encoded_image_data_injector.cc
+@@ -12,6 +12,7 @@
+
+ #include <algorithm>
+ #include <cstddef>
++#include <cstring> // fix build with -std=gnu++17
+
+ #include "absl/memory/memory.h"
+ #include "api/video/encoded_image.h"
+diff --git a/test/testsupport/jpeg_frame_writer.cc b/test/testsupport/jpeg_frame_writer.cc
+index 8bf1ee4..6817ee5 100644
+--- a/test/testsupport/jpeg_frame_writer.cc
++++ b/test/testsupport/jpeg_frame_writer.cc
+@@ -65,7 +65,7 @@ bool JpegFrameWriter::WriteFrame(const VideoFrame& input_frame, int quality) {
+ cinfo.image_width = input_frame.width();
+ cinfo.image_height = input_frame.height();
+ cinfo.input_components = kColorPlanes;
+- cinfo.in_color_space = JCS_EXT_BGR;
++ cinfo.in_color_space = JCS_RGB; // JCS_EXT_BGR; <- this only in _turbo
+ jpeg_set_defaults(&cinfo);
+ jpeg_set_quality(&cinfo, quality, TRUE);
+
+diff --git a/video/BUILD.gn b/video/BUILD.gn
+index 14109c3..21d768b 100644
+--- a/video/BUILD.gn
++++ b/video/BUILD.gn
+@@ -242,7 +242,7 @@ rtc_library("video_stream_encoder_impl") {
+ }
+
+ if (rtc_include_tests) {
+- rtc_library("video_mocks") {
++ rtc_source_set("video_mocks") {
+ testonly = true
+ sources = [ "test/mock_video_stream_encoder.h" ]
+ deps = [
+diff --git a/webrtc.gni b/webrtc.gni
+index 96b654a..636d1ce 100644
+--- a/webrtc.gni
++++ b/webrtc.gni
+@@ -12,7 +12,7 @@ import("//build/config/sanitizers/sanitizers.gni")
+ import("//build/config/sysroot.gni")
+ import("//build/config/ui.gni")
+ import("//build_overrides/build.gni")
+-import("//build_overrides/ssl/ssl.gni")
++#import("//build_overrides/ssl/ssl.gni")
+
+ if (!build_with_chromium && is_component_build) {
+ print("The Gn argument `is_component_build` is currently " +
+@@ -37,6 +37,25 @@ if (is_mac) {
+ }
+
+ declare_args() {
++ # Allow providing external ffmpeg
++ rtc_build_ffmpeg = true
++
++ # Used to specify an external ffmpeg include path when not compiling the
++ # library that comes with WebRTC (i.e. rtc_build_ffmpeg == 0).
++ rtc_ffmpeg_root = ""
++
++ # Used to specify an external ffmpeg libs.
++ rtc_ffmpeg_libs = []
++
++ # Used to specify and external opus include path when not compiling the
++ # library that comes with WebRTC (i.e. rtc_build_opus == 0).
++ rtc_opus_root = ""
++
++ # Used to specify an external opus libs.
++ rtc_opus_libs = []
++}
++
++declare_args() {
+ # 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
+@@ -84,7 +103,10 @@ declare_args() {
+
+ # 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 = owt_openssl_header_root
++ rtc_ssl_root = "" # owt_openssl_header_root
++
++ # Used to specify an external OpenSSL libs.
++ rtc_ssl_libs = []
+
+ # Selects fixed-point code where possible.
+ rtc_prefer_fixed_point = false
+@@ -151,7 +173,7 @@ declare_args() {
+ # Enabling H264 when building with MSVC is currently not supported, see
+ # bugs.webrtc.org/9213#c13 for more info.
+ rtc_use_h264 =
+- proprietary_codecs && !is_android && !is_ios && !(is_win && !is_clang)
++ proprietary_codecs && !is_android && !is_ios && !(is_win && !is_clang && rtc_build_ffmpeg)
+
+ # By default, use normal platform audio support or dummy audio, but don't
+ # use file-based audio playout and record.
+@@ -213,7 +235,7 @@ declare_args() {
+ rtc_build_libvpx = !build_with_mozilla
+ rtc_libvpx_build_vp9 = !build_with_mozilla
+ rtc_build_opus = !build_with_mozilla
+- rtc_build_ssl = !owt_use_openssl
++ rtc_build_ssl = !build_with_mozilla # owt_use_openssl
+ rtc_build_usrsctp = !build_with_mozilla
+
+ # Enable libevent task queues on platforms that support it.
+@@ -619,7 +641,8 @@ template("rtc_static_library") {
+ # 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") {
+- if (is_component_build || (defined(invoker.testonly) && invoker.testonly)) {
++ # if (is_component_build || (defined(invoker.testonly) && invoker.testonly)) {
++ if (is_component_build) {
+ target_type = "source_set"
+ } else {
+ target_type = "static_library"
Copied: libwebrtc/repos/community-testing-x86_64/third_party.diff (from rev 683368, libwebrtc/trunk/third_party.diff)
===================================================================
--- community-testing-x86_64/third_party.diff (rev 0)
+++ community-testing-x86_64/third_party.diff 2020-08-17 21:49:01 UTC (rev 683369)
@@ -0,0 +1,75 @@
+diff --git a/BUILD.gn b/BUILD.gn
+index a62632e2c3f..ea2a9325a9c 100644
+--- a/BUILD.gn
++++ b/BUILD.gn
+@@ -11,6 +11,9 @@ assert(!is_ios, "This is not used on iOS, don't drag it in unintentionally")
+ config("system_libjpeg_config") {
+ libs = [ "jpeg" ]
+ defines = [ "USE_SYSTEM_LIBJPEG" ]
++ if (system_libjpeg_root != "") {
++ include_dirs = [ system_libjpeg_root, system_libjpeg_root + "/src" ]
++ }
+ }
+
+ config("libjpeg_turbo_config") {
+diff --git a/abseil-cpp/absl/meta/type_traits.h b/abseil-cpp/absl/meta/type_traits.h
+index ba87d2f0edf..b9c5340cd3c 100644
+--- a/abseil-cpp/absl/meta/type_traits.h
++++ b/abseil-cpp/absl/meta/type_traits.h
+@@ -616,8 +616,19 @@ using common_type_t = typename std::common_type<T...>::type;
+ template <typename T>
+ using underlying_type_t = typename std::underlying_type<T>::type;
+
++#if __cplusplus > 201703L || (defined(_MSC_VER) && _MSVC_LANG > 201703L)
++template <typename T>
++struct result_of_helper;
++template <typename F, typename ...Args>
++struct result_of_helper<F(Args...)> {
++ using type = std::invoke_result_t<F, Args...>;
++};
++template <typename T>
++using result_of_t = typename result_of_helper<T>::type;
++#else // C++20
+ template <typename T>
+ using result_of_t = typename std::result_of<T>::type;
++#endif // C++20
+
+ namespace type_traits_internal {
+ // In MSVC we can't probe std::hash or stdext::hash because it triggers a
+diff --git a/libjpeg.gni b/libjpeg.gni
+index 049348b79bd..039385c9739 100644
+--- a/libjpeg.gni
++++ b/libjpeg.gni
+@@ -6,6 +6,9 @@ declare_args() {
+ # Uses system libjpeg. If true, overrides use_libjpeg_turbo.
+ use_system_libjpeg = false
+
++ # Used to specify an external libjpeg root path
++ system_libjpeg_root = ""
++
+ # Uses libjpeg_turbo as the jpeg implementation. Has no effect if
+ # use_system_libjpeg is set.
+ use_libjpeg_turbo = true
+diff --git a/usrsctp/BUILD.gn b/usrsctp/BUILD.gn
+index e8a5b1f9d41..1b52f28141c 100644
+--- a/usrsctp/BUILD.gn
++++ b/usrsctp/BUILD.gn
+@@ -3,6 +3,7 @@
+ # found in the LICENSE file.
+
+ import("//build/toolchain/toolchain.gni")
++import("//webrtc.gni")
+
+ config("usrsctp_config") {
+ include_dirs = [
+@@ -145,5 +146,9 @@ static_library("usrsctp") {
+ if (is_fuchsia) {
+ defines += [ "__Userspace_os_Fuchsia" ]
+ }
+- deps = [ "//third_party/boringssl" ]
++ if (rtc_build_ssl) {
++ deps += [ "//third_party/boringssl" ]
++ } else {
++ configs += [ "//rtc_base:external_ssl_library" ]
++ }
+ }
More information about the arch-commits
mailing list