From 56ed4680c457935f813ae36ce24324df7780b210 Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Tue, 12 Oct 2021 08:55:42 +0200 Subject: [PATCH] Add GN arg to force RTC_DLOG to be ON. Bug: None Change-Id: I7f5e80c015157718bb3f1d192b0c14f09f9bf3bf Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234840 Commit-Queue: Mirko Bonadei Reviewed-by: Markus Handell Cr-Commit-Position: refs/heads/main@{#35184} --- BUILD.gn | 4 ++++ webrtc.gni | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 6e7cd5d51b..215c74c525 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -118,6 +118,10 @@ config("common_inherited_config") { cflags = [] ldflags = [] + if (rtc_dlog_always_on) { + defines += [ "DLOG_ALWAYS_ON" ] + } + if (rtc_enable_symbol_export || is_component_build) { defines += [ "WEBRTC_ENABLE_SYMBOL_EXPORT" ] } diff --git a/webrtc.gni b/webrtc.gni index 90f69f03e0..c9856068af 100644 --- a/webrtc.gni +++ b/webrtc.gni @@ -45,6 +45,11 @@ declare_args() { } declare_args() { + # Setting this to trye, will make RTC_DLOG() expand to log statements instead + # 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 + # 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