Skip to content

Commit 666a3f4

Browse files
authoredSep 11, 2024
[libc] Stub TLS functions on the GPU temporarily (#108267)
Summary: There's an extern weak symbol for this, we should just factor these into a more common interface. Stub them temporarily to make the bots happy. PTXAS does not handle extern weak.
1 parent e3f936e commit 666a3f4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
 

‎libc/startup/gpu/amdgpu/start.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ extern "C" int main(int argc, char **argv, char **envp);
1717

1818
namespace LIBC_NAMESPACE_DECL {
1919

20+
// FIXME: Factor this out into common logic so we don't need to stub it here.
21+
void teardown_main_tls() {}
22+
2023
DataEnvironment app;
2124

2225
extern "C" uintptr_t __init_array_start[];

‎libc/startup/gpu/nvptx/start.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ namespace LIBC_NAMESPACE_DECL {
1919

2020
DataEnvironment app;
2121

22+
// FIXME: Factor this out into common logic so we don't need to stub it here.
23+
void teardown_main_tls() {}
24+
2225
extern "C" {
2326
// Nvidia's 'nvlink' linker does not provide these symbols. We instead need
2427
// to manually create them and update the globals in the loader implememtation.

0 commit comments

Comments
 (0)
Please sign in to comment.