Descriptionbase: Disallow mixing NDEBUG settings in logging.{h,cc}.
I am concerned about the possibility that other users of the
files in Chrome's base/ directory (e.g. Chrome OS) may build
a library from these files with NDEBUG defined and then link
it into a binary that includes the headers without defining
NDEBUG, or vice versa.
This change mangles InitLogging()'s name in logging.h based
on whether NDEBUG is defined so that linking will fail if
there's a mismatch (Evan provided useful advice here).
BUG=chromium-os:1124
TEST=built Debug and Release Chrome, built all Chrome OS packages, and then changed a Chrome OS package that links against libbase.a to define NDEBUG and checked that it failed to link
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57098
Patch Set 1 #Patch Set 2 : make #defines more specific #Patch Set 3 : ChromeInitLoggingImpl->BaseInitLoggingImpl and unify win/posix declarations #Patch Set 4 : restore TODO #Messages
Total messages: 7 (0 generated)
|