Add possibility to set RTC_OBJC_TYPE_PREFIX from GN.
This CL also adds the prefix RTC_TESTING to `ios_internal_pure_release_bot_arm64` in order to avoid ODR violations. Bug: b/292472934 Change-Id: If63020e679c8670b4c797217eb38fc8c2954d422 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/313240 Reviewed-by: Kári Helgason <kthelgason@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40476}
This commit is contained in:
parent
8c9e035edb
commit
9130431b54
4
BUILD.gn
4
BUILD.gn
@ -138,6 +138,10 @@ config("common_inherited_config") {
|
|||||||
cflags = []
|
cflags = []
|
||||||
ldflags = []
|
ldflags = []
|
||||||
|
|
||||||
|
if (rtc_objc_prefix != "") {
|
||||||
|
defines += [ "RTC_OBJC_TYPE_PREFIX=${rtc_objc_prefix}" ]
|
||||||
|
}
|
||||||
|
|
||||||
if (rtc_dlog_always_on) {
|
if (rtc_dlog_always_on) {
|
||||||
defines += [ "DLOG_ALWAYS_ON" ]
|
defines += [ "DLOG_ALWAYS_ON" ]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,9 +36,10 @@
|
|||||||
// WebRTC.framework with their own prefix in case symbol clashing is a
|
// WebRTC.framework with their own prefix in case symbol clashing is a
|
||||||
// problem.
|
// problem.
|
||||||
//
|
//
|
||||||
// This macro must only be defined here and not on via compiler flag to
|
// This macro must be defined uniformily across all the translation units.
|
||||||
// ensure it has a unique value.
|
#ifndef RTC_OBJC_TYPE_PREFIX
|
||||||
#define RTC_OBJC_TYPE_PREFIX
|
#define RTC_OBJC_TYPE_PREFIX
|
||||||
|
#endif
|
||||||
|
|
||||||
// RCT_OBJC_TYPE
|
// RCT_OBJC_TYPE
|
||||||
//
|
//
|
||||||
|
|||||||
@ -287,8 +287,8 @@
|
|||||||
|
|
||||||
__block RTC_OBJC_TYPE(RTCPeerConnectionFactory) * factory;
|
__block RTC_OBJC_TYPE(RTCPeerConnectionFactory) * factory;
|
||||||
__block RTC_OBJC_TYPE(RTCPeerConnection) * pc1;
|
__block RTC_OBJC_TYPE(RTCPeerConnection) * pc1;
|
||||||
RTCSessionDescription *rollback = [[RTCSessionDescription alloc] initWithType:RTCSdpTypeRollback
|
RTC_OBJC_TYPE(RTCSessionDescription) *rollback =
|
||||||
sdp:@""];
|
[[RTC_OBJC_TYPE(RTCSessionDescription) alloc] initWithType:RTCSdpTypeRollback sdp:@""];
|
||||||
|
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
factory = [[RTC_OBJC_TYPE(RTCPeerConnectionFactory) alloc] init];
|
factory = [[RTC_OBJC_TYPE(RTCPeerConnectionFactory) alloc] init];
|
||||||
|
|||||||
@ -271,7 +271,8 @@
|
|||||||
],
|
],
|
||||||
'ios_internal_pure_release_bot_arm64': [
|
'ios_internal_pure_release_bot_arm64': [
|
||||||
'ios', 'pure_release_bot', 'arm64',
|
'ios', 'pure_release_bot', 'arm64',
|
||||||
'ios_code_signing_identity_description', 'xctest'
|
'ios_code_signing_identity_description', 'xctest',
|
||||||
|
'rtc_objc_test_prefix',
|
||||||
],
|
],
|
||||||
'ios_internal_release_bot_arm64': [
|
'ios_internal_release_bot_arm64': [
|
||||||
'ios', 'release_bot', 'arm64', 'ios_code_signing_identity_description',
|
'ios', 'release_bot', 'arm64', 'ios_code_signing_identity_description',
|
||||||
@ -456,6 +457,9 @@
|
|||||||
'release_bot': {
|
'release_bot': {
|
||||||
'mixins': ['pure_release_bot', 'dcheck_always_on'],
|
'mixins': ['pure_release_bot', 'dcheck_always_on'],
|
||||||
},
|
},
|
||||||
|
'rtc_objc_test_prefix': {
|
||||||
|
'gn_args': 'rtc_objc_prefix="RTC_TESTING"',
|
||||||
|
},
|
||||||
'rtti': {
|
'rtti': {
|
||||||
'gn_args': 'use_rtti=true',
|
'gn_args': 'use_rtti=true',
|
||||||
},
|
},
|
||||||
|
|||||||
@ -239,6 +239,11 @@ declare_args() {
|
|||||||
# "warn": RTC_LOGs a message with LS_WARNING severity if the field trial
|
# "warn": RTC_LOGs a message with LS_WARNING severity if the field trial
|
||||||
# hasn't been registered.
|
# hasn't been registered.
|
||||||
rtc_strict_field_trials = ""
|
rtc_strict_field_trials = ""
|
||||||
|
|
||||||
|
# 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 = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!build_with_mozilla) {
|
if (!build_with_mozilla) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user