Enable WEBRTC_NO_TRACE for Chromium builds.
I'm also fixing WEBRTC_TRACE so that it won't break the build but on Linux I had to do something non traditional as is explained in the comments. Review URL: http://webrtc-codereview.appspot.com/269012 git-svn-id: http://webrtc.googlecode.com/svn/trunk@939 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
0db7dc6e18
commit
ded85f14ef
@ -95,6 +95,14 @@
|
|||||||
'..','../..', # common_types.h, typedefs.h
|
'..','../..', # common_types.h, typedefs.h
|
||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
|
['build_with_chromium==1', {
|
||||||
|
'defines': [
|
||||||
|
# This turns off tracing in webrtc to reduce the noise from
|
||||||
|
# the Chrome memory bots. Down the line we will enable WebRTC
|
||||||
|
# tracing for Chromium and remove this.
|
||||||
|
'WEBRTC_NO_TRACE',
|
||||||
|
],
|
||||||
|
}],
|
||||||
['OS=="linux"', {
|
['OS=="linux"', {
|
||||||
'defines': [
|
'defines': [
|
||||||
'WEBRTC_TARGET_PC',
|
'WEBRTC_TARGET_PC',
|
||||||
|
@ -19,12 +19,24 @@
|
|||||||
#include "typedefs.h"
|
#include "typedefs.h"
|
||||||
|
|
||||||
#ifdef WEBRTC_NO_TRACE
|
#ifdef WEBRTC_NO_TRACE
|
||||||
#define WEBRTC_TRACE
|
#ifdef WIN32
|
||||||
|
// Use __noop to avoid the C4353 compiler warning on Windows.
|
||||||
|
#define WEBRTC_TRACE __noop()
|
||||||
#else
|
#else
|
||||||
// Ideally we would use __VA_ARGS__ but it's not supported by all compilers
|
// This is a workaround. Ideally we should be able to do
|
||||||
// such as VS2003 (it's supported in VS2005). TODO (hellner) why
|
// something like:
|
||||||
// would this be better than current implementation (not convinced)?
|
// #define WEBRTC_TRACE(...) ((void)0)
|
||||||
#define WEBRTC_TRACE Trace::Add
|
// However, we have code that creates variables with the only
|
||||||
|
// intent of tracing out their value. So, if we take the above
|
||||||
|
// approach, then we'll get a compiler error about unused variables. :(
|
||||||
|
inline void WebRtcNoTrace(...) {}
|
||||||
|
#define WEBRTC_TRACE WebRtcNoTrace
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
// Ideally we would use _VA_ARGS_ but it's not supported by all compilers
|
||||||
|
// such as VS2003 (it's supported in VS2005). TODO (hellner) why
|
||||||
|
// would this be better than current implementation (not convinced)?
|
||||||
|
#define WEBRTC_TRACE Trace::Add
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user