[ASan/Win] We don't really need to use .CRT to call __asan_init when using -MD
llvm-svn: 215719
This commit is contained in:
parent
5e955fbd27
commit
f8b1cd210d
|
@ -18,10 +18,4 @@
|
|||
// exported.
|
||||
__attribute__((section(".preinit_array"), used))
|
||||
void (*__local_asan_preinit)(void) = __asan_init;
|
||||
#elif SANITIZER_WINDOWS && defined(_DLL)
|
||||
// On Windows, when using dynamic CRT (/MD), we can put a pointer
|
||||
// to __asan_init into the global list of C initializers.
|
||||
// See crt0dat.c in the CRT sources for the details.
|
||||
#pragma section(".CRT$XIB", long, read) // NOLINT
|
||||
__declspec(allocate(".CRT$XIB")) void (*__asan_preinit)() = __asan_init;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue