[compiler-rt] r291089 - [sancov] force default flags for windows
Mike Aizatsky via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 4 22:55:57 PST 2017
Author: aizatsky
Date: Thu Jan 5 00:55:55 2017
New Revision: 291089
URL: http://llvm.org/viewvc/llvm-project?rev=291089&view=rev
Log:
[sancov] force default flags for windows
Modified:
compiler-rt/trunk/lib/asan/asan_win.cc
compiler-rt/trunk/lib/sanitizer_common/sancov_flags.cc
Modified: compiler-rt/trunk/lib/asan/asan_win.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_win.cc?rev=291089&r1=291088&r2=291089&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_win.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_win.cc Thu Jan 5 00:55:55 2017
@@ -54,7 +54,6 @@ void __sanitizer_default_free_hook(void
const char* __asan_default_default_options() { return ""; }
const char* __asan_default_default_suppressions() { return ""; }
void __asan_default_on_error() {}
-const char* __sancov_default_options() { return ""; }
// 64-bit msvc will not prepend an underscore for symbols.
#ifdef _WIN64
#pragma comment(linker, "/alternatename:__sanitizer_malloc_hook=__sanitizer_default_malloc_hook") // NOLINT
@@ -62,14 +61,12 @@ const char* __sancov_default_options() {
#pragma comment(linker, "/alternatename:__asan_default_options=__asan_default_default_options") // NOLINT
#pragma comment(linker, "/alternatename:__asan_default_suppressions=__asan_default_default_suppressions") // NOLINT
#pragma comment(linker, "/alternatename:__asan_on_error=__asan_default_on_error") // NOLINT
-#pragma comment(linker, "/alternatename:__sancov_default_options=__sancov_default_default_options") // NOLINT
#else
#pragma comment(linker, "/alternatename:___sanitizer_malloc_hook=___sanitizer_default_malloc_hook") // NOLINT
#pragma comment(linker, "/alternatename:___sanitizer_free_hook=___sanitizer_default_free_hook") // NOLINT
#pragma comment(linker, "/alternatename:___asan_default_options=___asan_default_default_options") // NOLINT
#pragma comment(linker, "/alternatename:___asan_default_suppressions=___asan_default_default_suppressions") // NOLINT
#pragma comment(linker, "/alternatename:___asan_on_error=___asan_default_on_error") // NOLINT
-#pragma comment(linker, "/alternatename:___sancov_default_options=___sancov_default_default_options") // NOLINT
#endif
// }}}
} // extern "C"
Modified: compiler-rt/trunk/lib/sanitizer_common/sancov_flags.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sancov_flags.cc?rev=291089&r1=291088&r2=291089&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sancov_flags.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sancov_flags.cc Thu Jan 5 00:55:55 2017
@@ -13,6 +13,12 @@
#include "sancov_flags.h"
#include "sanitizer_flag_parser.h"
+#include "sanitizer_platform.h"
+
+#if SANITIZER_WINDOWS
+// Windows doesn't have weak symbols.
+extern "C" const char* __sancov_default_options() { return ""; }
+#endif
using namespace __sanitizer;
More information about the llvm-commits
mailing list