Skip to content

Commit 8bdaa12

Browse files
committed
[libc] Fix undefined exit symbol for the NVPTX build
Summary: NVPTX does not support external weak symbols being defined, disable this to get the bots working.
1 parent 2e8e435 commit 8bdaa12

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libc/src/stdlib/exit.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ extern "C" [[gnu::weak]] void __cxa_thread_finalize();
2424

2525
// TODO: use recursive mutex to protect this routine.
2626
[[noreturn]] LLVM_LIBC_FUNCTION(void, exit, (int status)) {
27+
// FIXME: The NVPTX target does not support external weak symbols correctly
28+
// despite being an ELF platform. Disable pending a future split.
29+
#if !defined(LIBC_TARGET_ARCH_IS_NVPTX)
2730
if (__cxa_thread_finalize)
2831
__cxa_thread_finalize();
32+
#endif
2933
__cxa_finalize(nullptr);
3034
internal::exit(status);
3135
}

0 commit comments

Comments
 (0)