Fix compilation of rtc_base_objc on iOS when building as part of Chromium.

When building as part of Chromium, webrtc/base/logging.h is overridden
by webrtc_overrides/webrtc/base/logging.h that uses Chromium logging
macros.

The implementation of webrtc/base/objc/RTCFileLogger.{h,mm} however has
dependency on the webrtc implementation of logging as it define a class
that inherits from rtc::LogSink. Since the class does not exists when
the overrides are used, the file fails compilation.

Fixes the compilation for iOS as part of Chromium by not compiling the
file webrtc/base/objc/RTCFileLogger.{h,mm} in that configuration.

BUG=459705

Review URL: https://codereview.webrtc.org/1898283002

Cr-Commit-Position: refs/heads/master@{#12438}
This commit is contained in:
sdefresne 2016-04-20 01:44:54 -07:00 committed by Commit bot
parent f41393376a
commit 1a0c4611d7
2 changed files with 13 additions and 4 deletions

View File

@ -619,8 +619,6 @@ if (is_ios) {
"objc/RTCDispatcher.m",
"objc/RTCFieldTrials.h",
"objc/RTCFieldTrials.mm",
"objc/RTCFileLogger.h",
"objc/RTCFileLogger.mm",
"objc/RTCLogging.h",
"objc/RTCLogging.mm",
"objc/RTCMacros.h",
@ -631,6 +629,13 @@ if (is_ios) {
"objc/RTCUIApplication.h",
"objc/RTCUIApplication.mm",
]
if (!build_with_chromium) {
sources += [
"objc/RTCFileLogger.h",
"objc/RTCFileLogger.mm",
]
}
}
}

View File

@ -38,8 +38,6 @@
'objc/RTCDispatcher.m',
'objc/RTCFieldTrials.h',
'objc/RTCFieldTrials.mm',
'objc/RTCFileLogger.h',
'objc/RTCFileLogger.mm',
'objc/RTCLogging.h',
'objc/RTCLogging.mm',
'objc/RTCMacros.h',
@ -64,6 +62,12 @@
},
},
}],
['build_with_chromium==0', {
'sources': [
'objc/RTCFileLogger.h',
'objc/RTCFileLogger.mm',
],
}],
],
}
],