[llvm-dev] [sanitizer] When do we expect PIC macro to be defined?
Taewook Oh via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 14 00:41:27 PDT 2018
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!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev