Bug 1269171 - Backout ccff1c4580ab (bug 1270832) because it doesn't actually work properly and blocks upcoming changes. r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 19 May 2016 14:41:14 +0900
changeset 298409 a640e6fa8ab9977fb6c5bcf63dc4daca6699477b
parent 298408 ae0dd17a0c862a9b504eb37fce84c980525085d1
child 298410 68da139d0866977c0ada86319fa94388f2255446
push id30281
push usercbook@mozilla.com
push dateTue, 24 May 2016 12:54:02 +0000
treeherdermozilla-central@829d3be6ba64 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1269171, 1270832
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 1269171 - Backout ccff1c4580ab (bug 1270832) because it doesn't actually work properly and blocks upcoming changes. r=froydnj It turns out that, since we're including <new> before setting _GLIBCXX_DEBUG, the debug parts of c++config.h are not activated, and that has an impact of how much of the debug features of the STL are activated. In contrast, the upcoming changes to the STL wrappers are avoiding the include of <new> before _GLIBCXX_DEBUG is set, which in turn breaks the build because, as we link things that use STL wrappers with things that don't, they end up with a different state of STL debugging, and have mismatching symbols.
config/gcc-stl-wrapper.template.h
--- a/config/gcc-stl-wrapper.template.h
+++ b/config/gcc-stl-wrapper.template.h
@@ -38,22 +38,24 @@
 #  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
 
-// 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)
+#if defined(DEBUG) && !defined(_GLIBCXX_DEBUG)
 // Enable checked iterators and other goodies
-  # define _GLIBCXX_DEBUG 1
+//
+// 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
 #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