[compiler-rt] r307816 - On Darwin, start building the TSan dylib for the iOS simulator.
Kuba Mracek via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 10:30:55 PDT 2017
Author: kuba.brecka
Date: Wed Jul 12 10:30:54 2017
New Revision: 307816
URL: http://llvm.org/viewvc/llvm-project?rev=307816&view=rev
Log:
On Darwin, start building the TSan dylib for the iOS simulator.
Modified:
compiler-rt/trunk/cmake/config-ix.cmake
compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors_mac.cc
Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=307816&r1=307815&r2=307816&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Wed Jul 12 10:30:54 2017
@@ -303,9 +303,7 @@ if(APPLE)
if(DARWIN_${platform}sim_ARCHS)
list(APPEND SANITIZER_COMMON_SUPPORTED_OS ${platform}sim)
list(APPEND PROFILE_SUPPORTED_OS ${platform}sim)
- if(DARWIN_${platform}_SYSROOT_INTERNAL)
- list(APPEND TSAN_SUPPORTED_OS ${platform}sim)
- endif()
+ list(APPEND TSAN_SUPPORTED_OS ${platform}sim)
endif()
foreach(arch ${DARWIN_${platform}sim_ARCHS})
list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors_mac.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors_mac.cc?rev=307816&r1=307815&r2=307816&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors_mac.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors_mac.cc Wed Jul 12 10:30:54 2017
@@ -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, v
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_ca
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
More information about the llvm-commits
mailing list