[compiler-rt] r200534 - tsan: fix Go build
Dmitry Vyukov
dvyukov at google.com
Fri Jan 31 03:20:55 PST 2014
Author: dvyukov
Date: Fri Jan 31 05:20:55 2014
New Revision: 200534
URL: http://llvm.org/viewvc/llvm-project?rev=200534&view=rev
Log:
tsan: fix Go build
Go linker does not like function-static objects.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.cc?rev=200534&r1=200533&r2=200534&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.cc Fri Jan 31 05:20:55 2014
@@ -18,6 +18,8 @@
namespace __sanitizer {
+CommonFlags common_flags_dont_use;
+
void SetCommonFlagsDefaults(CommonFlags *f) {
f->symbolize = true;
f->external_symbolizer_path = 0;
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.h?rev=200534&r1=200533&r2=200534&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_flags.h Fri Jan 31 05:20:55 2014
@@ -69,8 +69,8 @@ struct CommonFlags {
};
inline CommonFlags *common_flags() {
- static CommonFlags f;
- return &f;
+ extern CommonFlags common_flags_dont_use;
+ return &common_flags_dont_use;
}
void SetCommonFlagsDefaults(CommonFlags *f);
More information about the llvm-commits
mailing list