bug 685927 - make stl-wrappers more lenient when compiling ObjC with GCC. r=cjones
authorTed Mielczarek <ted.mielczarek@gmail.com>
Tue, 11 Oct 2011 11:10:29 -0400
changeset 80697 31e8fbc4d5f0646d3234ae60c5125804749dbfc6
parent 79886 ed4026a18fdba2917a68c83873da91810fb92f4a
child 80698 480ca9260f4b294f22563c9b9729f41589b3b157
push id434
push userclegnitto@mozilla.com
push dateWed, 21 Dec 2011 12:10:54 +0000
treeherdermozilla-beta@bddb6ed8dd47 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs685927
milestone10.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 685927 - make stl-wrappers more lenient when compiling ObjC with GCC. r=cjones
config/gcc-stl-wrapper.template.h
--- a/config/gcc-stl-wrapper.template.h
+++ b/config/gcc-stl-wrapper.template.h
@@ -36,17 +36,19 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef mozilla_${HEADER}_h
 #define mozilla_${HEADER}_h
 
-#if __EXCEPTIONS
+// For some reason, Apple's GCC refuses to honor -fno-exceptions when
+// compiling ObjC.
+#if __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS)
 #  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: