Bug 746794 - Always use the STL wrappers when #pragma visibility is supported. r=ted
☠☠ backed out by 034bbdc7b9c9 ☠ ☠
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 25 May 2012 08:31:33 +0200
changeset 94938 81c2e2ea2dbf58ef63c659b290dd612ead2cede9
parent 94937 201257e86edf1a1f1e22fb80365ae4fba8657bda
child 94939 a33088aeb47bad3ecca047a3e11f034f48019c61
push id22763
push useremorley@mozilla.com
push dateFri, 25 May 2012 13:26:36 +0000
treeherdermozilla-central@3871d6ca5fb2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs746794
milestone15.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 746794 - Always use the STL wrappers when #pragma visibility is supported. r=ted
config/gcc-stl-wrapper.template.h
configure.in
js/src/configure.in
mozglue/build/Makefile.in
--- a/config/gcc-stl-wrapper.template.h
+++ b/config/gcc-stl-wrapper.template.h
@@ -5,17 +5,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_${HEADER}_h
 #define mozilla_${HEADER}_h
 
 // For some reason, Apple's GCC refuses to honor -fno-exceptions when
 // compiling ObjC.
-#if __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS)
+#if __EXCEPTIONS && !(__OBJC__ && __APPLE_CC__)
 #  error "STL code can only be used with -fno-exceptions"
 #endif
 
 // Silence "warning: #include_next is a GCC extension"
 #pragma GCC system_header
 
 // mozalloc.h wants <new>; break the cycle by always explicitly
 // including <new> here.  NB: this is a tad sneaky.  Sez the gcc docs:
--- a/configure.in
+++ b/configure.in
@@ -3194,21 +3194,21 @@ EOF
                          fi
                        fi
                        rm -f conftest.{c,S}
                        ])
         if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \
                 "$ac_cv_have_visibility_class_bug" = "no"; then
           VISIBILITY_FLAGS='-I$(DIST)/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
           WRAP_SYSTEM_INCLUDES=1
-          STL_FLAGS='-I$(DIST)/stl_wrappers'
-          WRAP_STL_INCLUDES=1
         else
           VISIBILITY_FLAGS='-fvisibility=hidden'
         fi # have visibility pragma bug
+        STL_FLAGS='-I$(DIST)/stl_wrappers'
+        WRAP_STL_INCLUDES=1
       fi   # have visibility pragma
     fi     # have visibility(default) attribute
   fi       # have visibility(hidden) attribute
 fi         # GNU_CC
 
 # visibility hidden flag for Sun Studio on Solaris
 if test "$SOLARIS_SUNPRO_CC"; then
 VISIBILITY_FLAGS='-xldscope=hidden'
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2872,21 +2872,21 @@ EOF
                          fi
                        fi
                        rm -f conftest.{c,S}
                        ])
         if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \
                 "$ac_cv_have_visibility_class_bug" = "no"; then
           VISIBILITY_FLAGS='-I$(DIST)/system_wrappers_js -include $(topsrcdir)/config/gcc_hidden.h'
           WRAP_SYSTEM_INCLUDES=1
-          STL_FLAGS='-I$(DIST)/stl_wrappers'
-          WRAP_STL_INCLUDES=1
         else
           VISIBILITY_FLAGS='-fvisibility=hidden'
         fi # have visibility pragma bug
+        STL_FLAGS='-I$(DIST)/stl_wrappers'
+        WRAP_STL_INCLUDES=1
       fi   # have visibility pragma
     fi     # have visibility(default) attribute
   fi       # have visibility(hidden) attribute
 fi         # GNU_CC
 
 # visibility hidden flag for Sun Studio on Solaris
 if test "$SOLARIS_SUNPRO_CC"; then
 VISIBILITY_FLAGS='-xldscope=hidden'
--- a/mozglue/build/Makefile.in
+++ b/mozglue/build/Makefile.in
@@ -60,16 +60,17 @@ NO_INSTALL_IMPORT_LIBRARY = 1
 endif
 endif
 
 ifeq (Android,$(OS_TARGET))
 # To properly wrap jemalloc's pthread_atfork call.
 EXTRA_DSO_LDOPTS += -Wl,--wrap=pthread_atfork
 CPPSRCS += BionicGlue.cpp
 SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,android,$(DEPTH)/other-licenses/android)
+STL_FLAGS =
 endif
 
 ifeq (android, $(MOZ_WIDGET_TOOLKIT))
 # Add Android specific code
 EXTRA_DSO_LDOPTS += $(ZLIB_LIBS)
 SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,android,../android)
 endif