From 451579389cac34bf00755ebae44ea2ef01613eb9 Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Mon, 17 Sep 2018 11:34:58 +0200 Subject: [PATCH] Introduce GN arg rtc_exclude_runtime_enabled_features_default. This GN argument will be used to exclude the default implementation of runtime_features_enabled in order to allow clients to provide a custom implementation. This will allow to land [1] without breaking Chromium. [1] - https://webrtc-review.googlesource.com/c/src/+/100640 Bug: webrtc:9631 Change-Id: I4ce8ff12e277f81de42e272d8874d5bb3a4a2635 Reviewed-on: https://webrtc-review.googlesource.com/100641 Reviewed-by: Karl Wiberg Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/master@{#24753} --- webrtc.gni | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/webrtc.gni b/webrtc.gni index 5ed137fa8e..150599f8e9 100644 --- a/webrtc.gni +++ b/webrtc.gni @@ -54,6 +54,22 @@ declare_args() { # provided. rtc_exclude_metrics_default = build_with_chromium + # WARNING: This argument doesn't have any effect on the WebRTC build until + # https://webrtc-review.googlesource.com/c/src/+/100640 will land. + # Setting this to true will define + # WEBRTC_EXCLUDE_RUNTIME_ENABLED_FEATURES_DEFAULT which will tell the + # pre-processor to remove the default definition of symbols needed to use + # runtime_enabled_features. In that case a new implementation needs to be + # provided. + if (build_with_chromium) { + # When WebRTC is built as part of Chromium it should exclude the default + # implementation of runtime_enabled_features unless it is building for NACL or + # Chromecast. + rtc_exclude_runtime_enabled_features_default = !is_nacl && !is_chromecast + } else { + rtc_exclude_runtime_enabled_features_default = false + } + # 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.