[sanitizer] Allow to set SANITIZER_CAN_USE_PREINIT_ARRAY externally
llvm-svn: 325720
This commit is contained in:
parent
fb92f4e4c4
commit
e075709b41
|
@ -98,6 +98,7 @@
|
|||
// We can use .preinit_array section on Linux to call sanitizer initialization
|
||||
// functions very early in the process startup (unless PIC macro is defined).
|
||||
// FIXME: do we have anything like this on Mac?
|
||||
#ifndef SANITIZER_CAN_USE_PREINIT_ARRAY
|
||||
#if ((SANITIZER_LINUX && !SANITIZER_ANDROID) || \
|
||||
SANITIZER_FREEBSD) && !defined(PIC)
|
||||
# define SANITIZER_CAN_USE_PREINIT_ARRAY 1
|
||||
|
@ -108,6 +109,7 @@
|
|||
#else
|
||||
# define SANITIZER_CAN_USE_PREINIT_ARRAY 0
|
||||
#endif
|
||||
#endif // SANITIZER_CAN_USE_PREINIT_ARRAY
|
||||
|
||||
// GCC does not understand __has_feature
|
||||
#if !defined(__has_feature)
|
||||
|
|
Loading…
Reference in New Issue