diff options
author | mostynb@opera.com <mostynb@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 15:24:00 +0000 |
---|---|---|
committer | mostynb@opera.com <mostynb@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 15:24:00 +0000 |
commit | 65b0819e3ea5f4dd2e14db20129d32d649db71ae (patch) | |
tree | a2ddd1e018e100bbd1bf7be5acb448186681969d /base | |
parent | 3227101608807d8c456140aa8abecf211684aa54 (diff) | |
download | chromium_src-65b0819e3ea5f4dd2e14db20129d32d649db71ae.zip chromium_src-65b0819e3ea5f4dd2e14db20129d32d649db71ae.tar.gz chromium_src-65b0819e3ea5f4dd2e14db20129d32d649db71ae.tar.bz2 |
allow unofficial builds with DCHECK and DLOG disabled
Previously, it was not possible to produce unofficial builds without
DCHECKS and DLOGS.
Review URL: https://chromiumcodereview.appspot.com/17165003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207826 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/logging.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/base/logging.h b/base/logging.h index 55c9ebf..045ecd4 100644 --- a/base/logging.h +++ b/base/logging.h @@ -447,9 +447,17 @@ const LogSeverity LOG_0 = LOG_ERROR; #define PLOG_IF(severity, condition) \ LAZY_STREAM(PLOG_STREAM(severity), LOG_IS_ON(severity) && (condition)) -#if defined(OFFICIAL_BUILD) && defined(NDEBUG) +#if !defined(NDEBUG) +// Debug builds always include DCHECK and DLOG. +#undef LOGGING_IS_OFFICIAL_BUILD +#define LOGGING_IS_OFFICIAL_BUILD 0 +#elif defined(OFFICIAL_BUILD) +// Official release builds always disable and remove DCHECK and DLOG. +#undef LOGGING_IS_OFFICIAL_BUILD #define LOGGING_IS_OFFICIAL_BUILD 1 -#else +#elif !defined(LOGGING_IS_OFFICIAL_BUILD) +// Unless otherwise specified, unofficial release builds include +// DCHECK and DLOG. #define LOGGING_IS_OFFICIAL_BUILD 0 #endif |