summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-04-27 14:28:42 +0000
committerDmitry Vyukov <dvyukov@google.com>2016-04-27 14:28:42 +0000
commit4592eb0534b5736e70701e11cdd4f8205f647598 (patch)
tree81a52186ab89ffa7f369733e687320ddc1dbb4c9 /compiler-rt/lib
parentf875acbd7782d1a2caaf84892d52697d946de54f (diff)
downloadbcm5719-llvm-4592eb0534b5736e70701e11cdd4f8205f647598.tar.gz
bcm5719-llvm-4592eb0534b5736e70701e11cdd4f8205f647598.zip
tsan: fix darwin Go support
os_trace turns out to be a macro that creates static object. Function-static objects use __cxa_atexit and __dso_handle which are not present in Go runtime. llvm-svn: 267720
Diffstat (limited to 'compiler-rt/lib')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_mac.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
index 2d383707f3c..356541d2390 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
@@ -468,6 +468,7 @@ void LogMessageOnPrintf(const char *str) {
}
void LogFullErrorReport(const char *buffer) {
+#ifndef SANITIZER_GO
// Log with os_trace. This will make it into the crash log.
#if SANITIZER_OS_TRACE
if (GetMacosVersion() >= MACOS_VERSION_YOSEMITE) {
@@ -489,7 +490,6 @@ void LogFullErrorReport(const char *buffer) {
}
#endif
-#ifndef SANITIZER_GO
// Log to syslog.
// The logging on OS X may call pthread_create so we need the threading
// environment to be fully initialized. Also, this should never be called when
@@ -500,9 +500,9 @@ void LogFullErrorReport(const char *buffer) {
BlockingMutexLock l(&syslog_lock);
if (common_flags()->log_to_syslog)
WriteToSyslog(buffer);
-#endif
// The report is added to CrashLog as part of logging all of Printf output.
+#endif
}
SignalContext::WriteFlag SignalContext::GetWriteFlag(void *context) {
OpenPOWER on IntegriCloud