Add GN flag for an easier JNI generator upgrade.

Bug: b/293234089
Change-Id: I06dca333a806992cbff1b175f1b0875728a9f1fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315120
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40518}
This commit is contained in:
Mirko Bonadei 2023-08-07 11:54:35 +02:00 committed by WebRTC LUCI CQ
parent 34d82df2ba
commit 2bfa071d09
2 changed files with 8 additions and 0 deletions

View File

@ -138,6 +138,10 @@ config("common_inherited_config") {
cflags = [] cflags = []
ldflags = [] ldflags = []
if (rtc_jni_generator_legacy_symbols) {
defines += [ "RTC_JNI_GENERATOR_LEGACY_SYMBOLS" ]
}
if (rtc_objc_prefix != "") { if (rtc_objc_prefix != "") {
defines += [ "RTC_OBJC_TYPE_PREFIX=${rtc_objc_prefix}" ] defines += [ "RTC_OBJC_TYPE_PREFIX=${rtc_objc_prefix}" ]
} }

View File

@ -49,6 +49,10 @@ declare_args() {
} }
declare_args() { declare_args() {
# If set to true, C++ code will refer to the new JNI Generator symbols.
# If set to false the old ones will be used (to provide a nice update path).
rtc_jni_generator_legacy_symbols = false
# Setting this to true, will make RTC_DLOG() expand to log statements instead # Setting this to true, will make RTC_DLOG() expand to log statements instead
# of being removed by the preprocessor. # of being removed by the preprocessor.
# This is useful for example to be able to get RTC_DLOGs on a release build. # This is useful for example to be able to get RTC_DLOGs on a release build.