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 79350 31e8fbc4d5f0646d3234ae60c5125804749dbfc6
parent 78539 ed4026a18fdba2917a68c83873da91810fb92f4a
child 79351 480ca9260f4b294f22563c9b9729f41589b3b157
push idunknown
push userunknown
push dateunknown
reviewerscjones
bugs685927
milestone10.0a1
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: