mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 10:16:07 +00:00
[tsan] Always initialize tsan when building shared lib
Differential Revision: https://reviews.llvm.org/D142039
This commit is contained in:
parent
0b92f85270
commit
84bec0a219
@ -271,6 +271,7 @@ else()
|
||||
$<TARGET_OBJECTS:RTUbsan.${arch}>
|
||||
ADDITIONAL_HEADERS ${TSAN_HEADERS}
|
||||
CFLAGS ${TSAN_RTL_DYNAMIC_CFLAGS}
|
||||
DEFS SANITIZER_SHARED
|
||||
LINK_LIBS ${TSAN_DYNAMIC_LINK_LIBS}
|
||||
LINK_FLAGS ${SANITIZER_COMMON_LINK_FLAGS}
|
||||
PARENT_TARGET tsan)
|
||||
|
@ -681,7 +681,7 @@ void LazyInitialize(ThreadState *thr) {
|
||||
// If we can use .preinit_array, assume that __tsan_init
|
||||
// called from .preinit_array initializes runtime before
|
||||
// any instrumented code except ANDROID.
|
||||
#if (!SANITIZER_CAN_USE_PREINIT_ARRAY || defined(__ANDROID__))
|
||||
#if (!SANITIZER_CAN_USE_PREINIT_ARRAY || defined(SANITIZER_SHARED))
|
||||
if (UNLIKELY(!is_initialized))
|
||||
Initialize(thr);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user