[libc-commits] [libc] [libc] Provide empty definitions for weak symbols (PR #173412)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue Dec 23 11:37:07 PST 2025


================
@@ -20,15 +20,14 @@ extern "C" void __cxa_finalize(void *);
 //       as we have no way to ensure system libc will call the TLS destructors.
 //       We should run exit related tests in hermetic mode but this is currently
 //       blocked by https://github.com/llvm/llvm-project/issues/133925.
-extern "C" [[gnu::weak]] void __cxa_thread_finalize();
+extern "C" [[gnu::weak]] void __cxa_thread_finalize() {}
 
 // TODO: use recursive mutex to protect this routine.
 [[noreturn]] LLVM_LIBC_FUNCTION(void, exit, (int status)) {
 // FIXME: The NVPTX target does not support external weak symbols correctly
----------------
jhuber6 wrote:

Can probably remove this for NVPTX if it's defined now

https://github.com/llvm/llvm-project/pull/173412


More information about the libc-commits mailing list