breakpad/src
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
..
build Rename gyp variable use_titlecase_in_grd_files -> use_titlecase_in_grd. 2014-09-10 12:47:46 +00:00
client Breakpad: Fix build with new clang versions. 2014-12-10 16:08:09 +00:00
common dump_syms: Fix handling of DW_FORM_ref_addr to work with DWARF 4 2014-12-03 20:39:55 +00:00
google_breakpad Microdumps: support aarch64 and lib mapping from APK 2014-12-02 15:31:25 +00:00
processor Microdumps: support aarch64 and lib mapping from APK 2014-12-02 15:31:25 +00:00
third_party Add GYP build for the src/tools directory on Mac and Linux. 2014-07-24 15:22:51 +00:00
tools Add parameter --product to symupload.exe 2014-11-17 22:47:05 +00:00
breakpad_googletest_includes.h disable unittests under ASAN that use memory crashes 2013-12-11 05:38:34 +00:00
config.h.in Use AM_MAINTAINER_MODE so configure supports --enable-maintainer-mode 2013-12-10 12:28:11 +00:00