From: Alexey Samsonov Date: Wed, 7 Jan 2015 02:12:41 +0000 (+0000) Subject: [TSan] Fix Go build. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7eba6dfdaa7d9b93d94443196b8d3b62cbb31594;p=platform%2Fupstream%2Fllvm.git [TSan] Fix Go build. llvm-svn: 225336 --- diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc index 1000a99..c9bad22 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc @@ -940,6 +940,7 @@ bool IsDeadlySignal(int signum) { return (signum == SIGSEGV) && common_flags()->handle_segv; } +#ifndef SANITIZER_GO void *internal_start_thread(void(*func)(void *arg), void *arg) { // Start the thread with signals blocked, otherwise it can steal user signals. __sanitizer_sigset_t set, old; @@ -954,6 +955,11 @@ void *internal_start_thread(void(*func)(void *arg), void *arg) { void internal_join_thread(void *th) { real_pthread_join(th, 0); } +#else +void *internal_start_thread(void (*func)(void *), void *arg) { return 0; } + +void internal_join_thread(void *th) {} +#endif } // namespace __sanitizer diff --git a/compiler-rt/lib/tsan/go/tsan_go.cc b/compiler-rt/lib/tsan/go/tsan_go.cc index cccf72c..ea0beb7 100644 --- a/compiler-rt/lib/tsan/go/tsan_go.cc +++ b/compiler-rt/lib/tsan/go/tsan_go.cc @@ -28,13 +28,6 @@ bool IsExpectedReport(uptr addr, uptr size) { return false; } -void *internal_start_thread(void(*func)(void*), void *arg) { - return 0; -} - -void internal_join_thread(void *th) { -} - ReportLocation *SymbolizeData(uptr addr) { return 0; }