[PATCH] D39673: Toolchain: Normalize dwarf, sjlj and seh eh
Martell Malone via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 21 03:53:38 PST 2017
martell added a comment.
In https://reviews.llvm.org/D39673#929986, @mstorsjo wrote:
> I'm not sure if this is the right thing to do. Since the exception handling model more or less also defines what ABI the code conforms to, I can see it being useful to know what exception handling mode is intended to be used, even if compiling plain C code without exceptions enabled. E.g. when building libunwind, some of the C sources there have ifdefs that check for `__USING_SJLJ_EXCEPTIONS__` and/or `__ARM_DWARF_EH__`. With this change, one has to manually start specifying it when building libunwind, to match whatever the default and/or manually chosen exception handling model is.
It seems reasonable to me that one would specify `-fexceptions` when building c sources to get the macro for the exceptions, libunwind included, but yes right now there are c sources in `libunwind` that this would break and probably other libraries that have c sources that check unconditionally. This is not an issue for c++ as `-fexceptions` is enabled by default.
This is a little beyond the scope of what I am trying to achieve in this patch though and should be in a different differential after libunwind adds -fexceptions when building it's c sources, if we go that route.
For now I have update this patch to HEAD and reverted back to using the model macros defines independent of `-fexceptions` as you suggested.
Repository:
rL LLVM
https://reviews.llvm.org/D39673
More information about the cfe-commits
mailing list