Apple's GCC apparently has a bug where it doesn't honor -fno-exceptions when compiling ObjC, so you wind up with __EXCEPTIONS defined no matter what you do. This blows up in our stl wrappers, of course. We don't hit this on desktop OS X because Apple's GCC has a different bug there related to visibility which causes us to not use the stl wrappers at all. I have a patch that lets us work around this. I think if we move to clang this will all go away.
Created attachment 559506 [details] [diff] [review] make stl-wrappers more lenient when compiling ObjC with GCC This skips the #error case when we're compiling ObjC with GCC.
Sorry for the review latency, but wasn't the guess last time we talked that there was something iOS-specific (either different compiler build or different build flag) triggering this problem? If so, could we make this workaround contingent on iOS for the time being?
I believe it's probably a slightly different GCC (hard to tell with Apple's GCC versioning), since it passes the visibility test. Is it really worth it? We're unlikely to ever get an Apple GCC for x86/x86-64 that passes the test and hits this bug, we're more likely to switch to clang.
All I'm suggesting is to add __iOS__ or whatever to the guard here.
Created attachment 565996 [details] [diff] [review] make stl-wrappers more lenient when compiling ObjC with GCC Okay, this makes it iOS-specific.