[PATCH] [libcxxabi] Add __cxa_thread_atexit for TLS support on Linux.

Dan Albert danalbert at google.com
Wed Dec 17 14:58:39 PST 2014


================
Comment at: test/cxa_thread_atexit_test.cpp:16
@@ +15,3 @@
+extern "C" int __cxa_thread_atexit_impl(void (*dtor)(void *), void *obj,
+                                        void *dso_symbol) {
+  assert(dtor == reinterpret_cast<void (*)(void *)>(1));
----------------
danalbert wrote:
> jroelofs wrote:
> > to have the same signature, this needs throw().
> This is the _impl function, which doesn't have the `throw()` specifier (since it's C code). I suppose the `throw()` on the non-impl version of this is actually unnecessary since it's in `extern "C"`. I had just match the Apple functions above my decl in cxxabi.h.
> jroelofs: Hm. What about with statically linked libc?

I was under the impression that static linking on Linux wasn't really a thing any more: http://stackoverflow.com/questions/3430400/linux-static-linking-is-dead

At any rate, our tests will not build statically on Linux, so it's a non-issue. It's probably broken, but if we ever get to a state where we care about building this test statically, I'll fix it up then.

http://reviews.llvm.org/D6708

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list