Fix LazyInitialization in tsan
authorzijunzhao <zijunzhao@google.com>
Tue, 25 Oct 2022 00:19:03 +0000 (00:19 +0000)
committerzijunzhao <zijunzhao@google.com>
Tue, 25 Oct 2022 00:59:03 +0000 (00:59 +0000)
commit1d31ea68c0cbc24d690a58c296b50b61595b6127
tree2f3eb123fe7bf7162c92680f43913d4de5ed9793
parent0c849adf4f979ace89ffc644c2281573a2c4fbfb
Fix LazyInitialization in tsan

In Android, further initialization is always necessary whether preinit_array can be used.
LazyInitialize is needed regardless of .preinit_array support on platforms where runtime is loaded as dynamic library, e.g. Android.

Reviewed By: dvyukov, vitalybuka

Differential Revision: https://reviews.llvm.org/D135925
compiler-rt/lib/tsan/rtl/tsan_rtl.h