[libcxx-commits] [libcxxabi] [libcxx] [libcxxabi] Dont throw in make exception ptr if __cxa_init_primary_exception is available (PR #65534)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 11 07:35:42 PDT 2023
itrofimow wrote:
I had to split `typeinfo` header to break the `exception` -> `typeinfo` -> `exception` circular dependency, hence a sizeable +/-, other than that the PR is basically a couple dozen LoC.
The build is failing mostly due to missing changes in abi-lists for various architectures, i'm planning to fix that once/if the general idea is approved.
One question left is the way to determine whether the new `__cxa_init_primary_exception` function is available: right now i'm relying on `LIBCXX_BUILDING_LIBCXXABI`, but i think it's not enough.
Should i add a new define into libcxxabi, or check for `__cxa_init_primary_exception` presence at runtime via `dlsym`?
Personally i'm leaning towards `dlsym`, since it would not only allow linking with other versions of libcxxabi, but potentially implementing the same optimization when linked against libcxxrt, see https://github.com/libcxxrt/libcxxrt/pull/23.
@philnik777 @EricWF Could you please have a look?
https://github.com/llvm/llvm-project/pull/65534
More information about the libcxx-commits
mailing list