breakpad/src/client/mac
mark@chromium.org bbbe29de11 Breakpad: Fix build with new clang versions.
gcc has a single exception setting for all languages. Saying -fno-exceptions
in gcc disables exceptions and cleanups for cc files, but has no effect for mm
files.

In clang, -fno-exceptions only disables c++ exceptions, but keeps objective-c
exceptions and cleanups enabled.

http://llvm.org/viewvc/llvm-project?view=revision&revision=220714 changed
__EXCEPTIONS to be defined for clang when cleanups are enabled, independent of
if c++ exceptions are enabled. (This was necessary to have clang work with
glibc which looks at __EXCEPTIONS to decide if cleanups are enabled.)

Breakpad tried to use __EXCEPTIONS to figure out if c++ exceptions are enabled.
In cc files, this works: -fno-exceptions will disable c++ exceptions and
cleanups. But in mm files, -fno-exceptions will disable c++ exceptions and
objective-c exceptions will still be enabled, and so cleanups must run and hence
__EXCEPTIONS is defined.

To make things work with both old and new compilers, do the try/catch hack in
mm files either if __EXCEPTIONS is not defined (for old compilers) or if the
compiler is clang and __has_feature(cxx_exceptions) isn't set (which will work
for new clangs too, and which cleanly maps to if c++ exceptions are enabled).

Patch by Nico Weber <thakis@chromium.org>

Review URL: https://breakpad.appspot.com/1774002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1409 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-12-10 16:08:09 +00:00
..
Breakpad.xcodeproj Fixing the Mac Inspector build by adding the launch_report dependency to the breakpadUtilities dylib project after it got pulled out from Inspector.mm 2014-10-17 17:44:09 +00:00
crash_generation Mac: Add support for in-process crash reporting to Breakpad. 2014-09-15 22:48:18 +00:00
Framework Breakpad: Fix build with new clang versions. 2014-12-10 16:08:09 +00:00
gcov Open sourcing the Breakpad framework from Google. 2009-04-01 03:18:49 +00:00
handler Set 32 bits iOS app to use vm_region_recurse_64. 2014-08-11 12:55:23 +00:00
sender Adding possibility for client to upload the file 2014-09-01 11:02:57 +00:00
testapp review: http://breakpad.appspot.com/138001 2010-07-29 05:25:43 +00:00
tests Enable the SIGABRT handler on desktop OS X 2013-08-14 17:14:18 +00:00
UnitTests-Info.plist Open sourcing the Breakpad framework from Google. 2009-04-01 03:18:49 +00:00