summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_internal_defs.h
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-10-07 01:46:36 +0000
committerVedant Kumar <vsk@apple.com>2017-10-07 01:46:36 +0000
commitf41e67051268425df1cbbc1a208b8eba03875885 (patch)
treef3b82637985754650a5b234b1f7ab99aeac0f8d8 /lib/sanitizer_common/sanitizer_internal_defs.h
parent83fd3a8510401f7e7a6f1eb82022b967be9718f0 (diff)
downloadcompiler-rt-f41e67051268425df1cbbc1a208b8eba03875885.tar.gz
[ubsan] Add a static runtime on Darwin
As a follow-up to r315142, this makes it possible to use ubsan with a static runtime on Darwin. I've also added a new StandaloneStatic testing configuration so the new setup can be tested. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315143 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_internal_defs.h')
-rw-r--r--lib/sanitizer_common/sanitizer_internal_defs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_internal_defs.h b/lib/sanitizer_common/sanitizer_internal_defs.h
index 0889034e1..003a3c7a9 100644
--- a/lib/sanitizer_common/sanitizer_internal_defs.h
+++ b/lib/sanitizer_common/sanitizer_internal_defs.h
@@ -64,11 +64,13 @@
// SANITIZER_SUPPORTS_WEAK_HOOKS means that we support real weak functions that
// will evaluate to a null pointer when not defined.
+#ifndef SANITIZER_SUPPORTS_WEAK_HOOKS
#if (SANITIZER_LINUX || SANITIZER_MAC) && !SANITIZER_GO
# define SANITIZER_SUPPORTS_WEAK_HOOKS 1
#else
# define SANITIZER_SUPPORTS_WEAK_HOOKS 0
#endif
+#endif // SANITIZER_SUPPORTS_WEAK_HOOKS
// For some weak hooks that will be called very often and we want to avoid the
// overhead of executing the default implementation when it is not necessary,
// we can use the flag SANITIZER_SUPPORTS_WEAK_HOOKS to only define the default