forked from OSchip/llvm-project
[sanitizer] Fix darwin Go tsan build by unifying r281567 and r281553.
Avoid redefining the weak stub when building gotsan.cc llvm-svn: 281576
This commit is contained in:
parent
3076cc398d
commit
546d2a3820
|
@ -488,4 +488,11 @@ int __sanitizer_install_malloc_and_free_hooks(void (*malloc_hook)(const void *,
|
|||
void (*free_hook)(const void *)) {
|
||||
return InstallMallocFreeHooks(malloc_hook, free_hook);
|
||||
}
|
||||
|
||||
#if !SANITIZER_SUPPORTS_WEAK_HOOKS
|
||||
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
|
||||
void __sanitizer_print_memory_profile(int top_percent) {
|
||||
(void)top_percent;
|
||||
}
|
||||
#endif
|
||||
} // extern "C"
|
||||
|
|
|
@ -747,12 +747,4 @@ void GetMemoryProfile(fill_profile_f cb, uptr *stats, uptr stats_size) { }
|
|||
|
||||
} // namespace __sanitizer
|
||||
|
||||
extern "C" {
|
||||
// Provide a definition on mac, where 'weak' symbols don't behave like on linux.
|
||||
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
|
||||
void __sanitizer_print_memory_profile(int top_percent) {
|
||||
(void)top_percent;
|
||||
}
|
||||
} // extern "C"
|
||||
|
||||
#endif // SANITIZER_MAC
|
||||
|
|
|
@ -42,8 +42,6 @@ extern "C" void __tsan_resume() {
|
|||
__tsan_resumed = 1;
|
||||
}
|
||||
|
||||
extern "C" void __sanitizer_print_memory_profile(int percent) {} // Stub.
|
||||
|
||||
namespace __tsan {
|
||||
|
||||
#if !defined(SANITIZER_GO) && !SANITIZER_MAC
|
||||
|
|
Loading…
Reference in New Issue