aboutsummaryrefslogtreecommitdiff
path: root/lib/tsan/tsan_preinit.cpp
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2024-09-24 13:47:29 +0200
committerAndrew Kelley <andrew@ziglang.org>2024-09-24 23:58:21 -0700
commita40cdad18c06fd377622c47aa34564df7ea959b5 (patch)
treedbcfabc2191cdbf2acc6c356c5ea25237b29d8f1 /lib/tsan/tsan_preinit.cpp
parent7f6b7c56089eaa5b147e71b3d98328498c9025c8 (diff)
downloadzig-a40cdad18c06fd377622c47aa34564df7ea959b5.tar.gz
zig-a40cdad18c06fd377622c47aa34564df7ea959b5.zip
tsan: Update to LLVM 19.1.0.
Diffstat (limited to 'lib/tsan/tsan_preinit.cpp')
-rw-r--r--lib/tsan/tsan_preinit.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/tsan/tsan_preinit.cpp b/lib/tsan/tsan_preinit.cpp
index 205bdbf93b..69700f2dde 100644
--- a/lib/tsan/tsan_preinit.cpp
+++ b/lib/tsan/tsan_preinit.cpp
@@ -16,11 +16,9 @@
#if SANITIZER_CAN_USE_PREINIT_ARRAY
-// The symbol is called __local_tsan_preinit, because it's not intended to be
-// exported.
-// This code linked into the main executable when -fsanitize=thread is in
-// the link flags. It can only use exported interface functions.
-__attribute__((section(".preinit_array"), used))
-void (*__local_tsan_preinit)(void) = __tsan_init;
+// This section is linked into the main executable when -fsanitize=thread is
+// specified to perform initialization at a very early stage.
+__attribute__((section(".preinit_array"), used)) static auto preinit =
+ __tsan_init;
#endif