[compiler-rt] r325720 - [sanitizer] Allow to set SANITIZER_CAN_USE_PREINIT_ARRAY externally
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 13:13:08 PST 2018
Author: vitalybuka
Date: Wed Feb 21 13:13:07 2018
New Revision: 325720
URL: http://llvm.org/viewvc/llvm-project?rev=325720&view=rev
Log:
[sanitizer] Allow to set SANITIZER_CAN_USE_PREINIT_ARRAY externally
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h?rev=325720&r1=325719&r2=325720&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h Wed Feb 21 13:13:07 2018
@@ -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)
More information about the llvm-commits
mailing list