From d6b9348bf350a9f0ea66d333193fc728ba899b60 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 30 Jan 2013 09:46:53 +0000 Subject: tsan: introduce a helped macro CPP_WEAK (Go linker does not support weak symbols) llvm-svn: 173917 --- compiler-rt/lib/tsan/rtl/tsan_defs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler-rt/lib/tsan/rtl/tsan_defs.h') diff --git a/compiler-rt/lib/tsan/rtl/tsan_defs.h b/compiler-rt/lib/tsan/rtl/tsan_defs.h index e0c04733f0a..125458afd11 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_defs.h +++ b/compiler-rt/lib/tsan/rtl/tsan_defs.h @@ -28,10 +28,13 @@ namespace __tsan { const bool kGoMode = true; const bool kCppMode = false; const char *const kTsanOptionsEnv = "GORACE"; +#define CPP_WEAK WEAK #else const bool kGoMode = false; const bool kCppMode = true; const char *const kTsanOptionsEnv = "TSAN_OPTIONS"; +// Go linker does not support weak symbols. +#define CPP_WEAK #endif const int kTidBits = 13; -- cgit v1.2.3