Bug 1270832 - turn on debug mode for libstdc++ headers; r=glandium
authorNathan Froyd <froydnj@gmail.com>
Wed, 11 May 2016 17:01:39 -0400
changeset 297015 ccff1c4580ab12aff5cb7b380771192b94b07c21
parent 297014 8dd88e2a1976afe8b7876cedb74727459de5b9c0
child 297016 fecfcebc50b7c9ed2cf55001a4fa3726a98572df
push id76570
push usernfroyd@mozilla.com
push dateWed, 11 May 2016 21:04:20 +0000
treeherdermozilla-inbound@ccff1c4580ab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1270832
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1270832 - turn on debug mode for libstdc++ headers; r=glandium
config/gcc-stl-wrapper.template.h
--- a/config/gcc-stl-wrapper.template.h
+++ b/config/gcc-stl-wrapper.template.h
@@ -38,24 +38,22 @@
 #  if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
 #    include "mozilla/mozalloc.h"
 #  else
 #    error "STL code can only be used with infallible ::operator new()"
 #  endif
 
 #endif
 
-#if defined(DEBUG) && !defined(_GLIBCXX_DEBUG)
+// Don't enable debug mode with the clang plugin; clang doesn't recognize
+// the debug/ versions of the stdlib headers as being system headers, leading
+// to complaints about code that's out of our control.
+#if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) && !defined(MOZ_CLANG_PLUGIN)
 // Enable checked iterators and other goodies
-//
-// FIXME/bug 551254: gcc's debug STL implementation requires -frtti.
-// Figure out how to resolve this with -fno-rtti.  Maybe build with
-// -frtti in DEBUG builds?
-//
-//  # define _GLIBCXX_DEBUG 1
+  # define _GLIBCXX_DEBUG 1
 #endif
 
 #pragma GCC visibility push(default)
 #include_next <${HEADER}>
 #pragma GCC visibility pop
 
 // gcc calls a __throw_*() function from bits/functexcept.h when it
 // wants to "throw an exception".  functexcept exists nominally to