[libcxx-commits] [PATCH] D138461: [libcxxabi] Always use thread_local for cxa_exception_storage
Shoaib Meenai via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 28 12:00:52 PST 2022
smeenai added a comment.
Thanks for the revert.
We could take an intermediate approach where we detect `thread_local` support via CMake and turn on `HAS_THREAD_LOCAL` in that case, instead of removing the non-`thread_local` code path entirely. That'd let us shake out any issues with the `thread_local` path while also preserving support for other platforms (though I'm surprised we're still supporting platforms which have threads but not `thread_local`).
================
Comment at: libcxxabi/src/cxa_exception_storage.cpp:27
-#elif defined(HAS_THREAD_LOCAL)
----------------
ldionne wrote:
> So IIUC, this was basically never defined previously, right?
Yup. This seems to go back to the original implementation of this code back in 2011, but it's hard to determine if this was intended to be automatically turned on e.g. via CMake if `thread_local` was detected.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138461/new/
https://reviews.llvm.org/D138461
More information about the libcxx-commits
mailing list