[libcxx-commits] [PATCH] D64191: [libcxxabi] Don't process exceptions in cxa_handlers when they're disabled
Shoaib Meenai via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 9 23:12:17 PDT 2019
smeenai added a comment.
In D64191#1577566 <https://reviews.llvm.org/D64191#1577566>, @thakis wrote:
> FYIe, you can also prevent this symbol to be linked in by putting a __cxa_demangle function in an obj file that gets linked first, like so: https://cs.chromium.org/chromium/src/third_party/android_crazy_linker/src/src/crazy_linker_wrappers.cpp?type=cs&q=cxa_demangle+file:android&sq=package:chromium&g=0&l=54 – but I agree that since __cxa_demangle is so large, it'd be nice if the upstream version was behind some kind of define. Then we could set that and remove that hack in chromium too. I don't have an opinion on if that should be a new define or if _LIBCXXABI_NO_EXCEPTIONS should be reused. Actually, I think we build libcxxabi with exceptions enabled because some of our test code can in theory throw exceptions, but we have an external dumper so we don't need the stack from terminate() – so it'd be somewhat more convenient for us if we could turn off the stack from terminate() (and the pulling in of __cxa_demangle) while still being able to build without setting _LIBCXXABI_NO_EXCEPTIONS.
We have a local libc++abi patch to just disable the demangler altogether under certain configurations because of similar size concerns. I never got around to upstreaming that, but it seems like something that's wanted by multiple people, at least.
Repository:
rCXXA libc++abi
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64191/new/
https://reviews.llvm.org/D64191
More information about the libcxx-commits
mailing list