Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Unified Diff: base/logging.h

Issue 17165003: allow unofficial builds with DCHECK and DLOG disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename _is_ to _like_ in gyp setting and rejig ifdeffery Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.h
diff --git a/base/logging.h b/base/logging.h
index 55c9ebfafbf3db7f44419145bcb486073fff6e88..045ecd432f25b0d84a255f376eb3ca318c150837 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
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698