summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_common_libcdep.cc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-10-28 14:16:13 +0000
committerDmitry Vyukov <dvyukov@google.com>2016-10-28 14:16:13 +0000
commit9c1c8a473b7ea07050090a6d68ceb16aa2bb6a89 (patch)
tree5937bbd700f97a242af8bc66a8f3d63a9481bc68 /lib/sanitizer_common/sanitizer_common_libcdep.cc
parentf3363f49366f3d876764baa2d1e46764acb9e297 (diff)
tsan: fix windows build
Currently fails with: C:\workdir\compiler-rt\lib\tsan\go>gcc -c -o race_windows_amd64.syso gotsan.cc -I..\rtl -I..\.. -I..\..\sanitizer_common -I..\..\..\include -m64 -Wall -fno-exceptions -fno-rtti -DSANITIZER_GO -Wno-error=at tributes -Wno-attributes -Wno-format -Wno-maybe-uninitialized -DSANITIZER_DEBUG=0 -O3 -fomit-frame-pointer -std=c++11 gotsan.cc:9229:0: warning: ignoring #pragma comment [-Wunknown-pragmas] #pragma comment(linker, "/alternatename:__sanitizer_print_memory_profile=__sanitizer_default_print_memory_profile") // NOLINT ^ gotsan.cc: In function 'void __sanitizer_print_memory_profile(int)': gotsan.cc:9226:17: error: redefinition of 'void __sanitizer_print_memory_profile(int)' extern "C" void __sanitizer_print_memory_profile(int top_percent) {} ^ gotsan.cc:6898:6: note: 'void __sanitizer_print_memory_profile(int)' previously defined here void __sanitizer_print_memory_profile(int top_percent) { Remove __sanitizer_print_memory_profile from Go build, it is not needed. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@285400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common_libcdep.cc')
-rw-r--r--lib/sanitizer_common/sanitizer_common_libcdep.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_common_libcdep.cc b/lib/sanitizer_common/sanitizer_common_libcdep.cc
index 94ef2ee07..288ca9556 100644
--- a/lib/sanitizer_common/sanitizer_common_libcdep.cc
+++ b/lib/sanitizer_common/sanitizer_common_libcdep.cc
@@ -76,6 +76,7 @@ void SetAllocatorReleaseToOSCallback(AllocatorReleaseToOSCallback Callback) {
ReleseCallback = Callback;
}
+#if SANITIZER_LINUX && !SANITIZER_GO
void BackgroundThread(void *arg) {
uptr hard_rss_limit_mb = common_flags()->hard_rss_limit_mb;
uptr soft_rss_limit_mb = common_flags()->soft_rss_limit_mb;
@@ -135,6 +136,7 @@ void BackgroundThread(void *arg) {
}
}
}
+#endif
void WriteToSyslog(const char *msg) {
InternalScopedString msg_copy(kErrorMessageBufferSize);