aboutsummaryrefslogtreecommitdiff
path: root/src/common/convert_UTF.c
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org>2014-12-10 16:08:09 +0000
committermark@chromium.org <mark@chromium.org>2014-12-10 16:08:09 +0000
commitbbbe29de119843d6fd409c43f11b365f7de3b45c (patch)
treeadd3b97f4a15e94755166377d558a6ace342cc4a /src/common/convert_UTF.c
parentdump_syms: Fix handling of DW_FORM_ref_addr to work with DWARF 4 (diff)
downloadbreakpad-bbbe29de119843d6fd409c43f11b365f7de3b45c.tar.xz
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
Diffstat (limited to 'src/common/convert_UTF.c')
0 files changed, 0 insertions, 0 deletions