Hello,
I have a problem with tsan library contains .preinit_array section even with PIC build, and found that SANITIZER_CAN_USE_PREINIT_ARRAY macro is guarded by PIC macro (https://github.com/llvm-mirror/compiler-rt/blob/master/lib/sanitizer_common/sanitizer_internal_defs.h#L100). I assumed that PIC macro to be defined if COMPILER_RT_HAS_FPIC_FLAG is set, but it seems that PIC macro is never defined unless it is explicitly given by the build command line – I couldn’t find any place that defines the macro from cmake files. Is that expected, or something is missed here? Thanks!
Best,
Taewook