diff options
author | Kuba Mracek <mracek@apple.com> | 2017-07-12 17:30:54 +0000 |
---|---|---|
committer | Kuba Mracek <mracek@apple.com> | 2017-07-12 17:30:54 +0000 |
commit | 880288aa6e7e6499b590fe792a16edec3193645a (patch) | |
tree | ea3998503f1d03293977535adfb5ed41ec3937d9 /lib/tsan/rtl/tsan_interceptors_mac.cc | |
parent | 241fc072806134c13fa941788c4e529a35a26e46 (diff) |
On Darwin, start building the TSan dylib for the iOS simulator.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307816 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_interceptors_mac.cc')
-rw-r--r-- | lib/tsan/rtl/tsan_interceptors_mac.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/tsan/rtl/tsan_interceptors_mac.cc b/lib/tsan/rtl/tsan_interceptors_mac.cc index f6bf8a0e5..4f1079467 100644 --- a/lib/tsan/rtl/tsan_interceptors_mac.cc +++ b/lib/tsan/rtl/tsan_interceptors_mac.cc @@ -21,7 +21,10 @@ #include "tsan_interface_ann.h" #include <libkern/OSAtomic.h> + +#if defined(__has_include) && __has_include(<xpc/xpc.h>) #include <xpc/xpc.h> +#endif // #if defined(__has_include) && __has_include(<xpc/xpc.h>) typedef long long_t; // NOLINT @@ -235,6 +238,8 @@ TSAN_INTERCEPTOR(void, os_lock_unlock, void *lock) { REAL(os_lock_unlock)(lock); } +#if defined(__has_include) && __has_include(<xpc/xpc.h>) + TSAN_INTERCEPTOR(void, xpc_connection_set_event_handler, xpc_connection_t connection, xpc_handler_t handler) { SCOPED_TSAN_INTERCEPTOR(xpc_connection_set_event_handler, connection, @@ -287,6 +292,8 @@ TSAN_INTERCEPTOR(void, xpc_connection_cancel, xpc_connection_t connection) { REAL(xpc_connection_cancel)(connection); } +#endif // #if defined(__has_include) && __has_include(<xpc/xpc.h>) + // On macOS, libc++ is always linked dynamically, so intercepting works the // usual way. #define STDCXX_INTERCEPTOR TSAN_INTERCEPTOR |