Precompile out our standalone CHECK macros in a Chromium build.
As documented, the use of overrides/webrtc/base/logging.h in a Chromium build reuslts in redefined macro errors. Fortunately, Chromium's macros can be used as drop-in replacements for the standalone versions. TBR=henrike Review URL: https://webrtc-codereview.appspot.com/17239004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7004 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -111,6 +111,9 @@ void FatalMessage::Init(const char* file, int line) {
|
||||
<< file << ", line " << line << std::endl << "# ";
|
||||
}
|
||||
|
||||
// Refer to comments in checks.h.
|
||||
#ifndef WEBRTC_CHROMIUM_BUILD
|
||||
|
||||
// MSVC doesn't like complex extern templates and DLLs.
|
||||
#if !defined(COMPILER_MSVC)
|
||||
// Explicit instantiations for commonly used comparisons.
|
||||
@ -126,4 +129,6 @@ template std::string* MakeCheckOpString<std::string, std::string>(
|
||||
const std::string&, const std::string&, const char* name);
|
||||
#endif
|
||||
|
||||
#endif // WEBRTC_CHROMIUM_BUILD
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -52,6 +52,11 @@
|
||||
|
||||
namespace rtc {
|
||||
|
||||
// The use of overrides/webrtc/base/logging.h in a Chromium build results in
|
||||
// redefined macro errors. Fortunately, Chromium's macros can be used as drop-in
|
||||
// replacements for the standalone versions.
|
||||
#ifndef WEBRTC_CHROMIUM_BUILD
|
||||
|
||||
// Helper macro which avoids evaluating the arguments to a stream if
|
||||
// the condition doesn't hold.
|
||||
#define LAZY_STREAM(stream, condition) \
|
||||
@ -162,6 +167,8 @@ DEFINE_CHECK_OP_IMPL(GT, > )
|
||||
#define DCHECK_LE(v1, v2) EAT_STREAM_PARAMETERS
|
||||
#endif
|
||||
|
||||
#endif // WEBRTC_CHROMIUM_BUILD
|
||||
|
||||
#define FATAL() rtc::FatalMessage(__FILE__, __LINE__).stream()
|
||||
// TODO(ajm): Consider adding NOTIMPLEMENTED and NOTREACHED macros when
|
||||
// base/logging.h and system_wrappers/logging.h are consolidated such that we
|
||||
|
Reference in New Issue
Block a user