forked from OSchip/llvm-project
[ASan/Win] Don't apply dllexport to __asan_init in the DLL thunk
This fixes '___asan_init_v4 already defined' errors when linking some of Chromium DLLs. Looks like one of the DLL is using a .lib produced while linking another DLL and it exploded after r212699. I'm trying to come up with a small testcase... llvm-svn: 212815
This commit is contained in:
parent
a2c4950e6e
commit
03f1e408de
|
@ -179,7 +179,7 @@ else()
|
|||
add_compiler_rt_runtime(clang_rt.asan_dll_thunk-${arch} ${arch} STATIC
|
||||
SOURCES asan_dll_thunk.cc
|
||||
$<TARGET_OBJECTS:RTInterception.${arch}>
|
||||
CFLAGS ${ASAN_CFLAGS} -DASAN_DLL_THUNK
|
||||
CFLAGS ${ASAN_CFLAGS} -DASAN_DLL_THUNK -DSANITIZER_DLL_THUNK
|
||||
DEFS ${ASAN_COMMON_DEFINITIONS})
|
||||
add_dependencies(asan clang_rt.asan_dll_thunk-${arch})
|
||||
endif()
|
||||
|
|
|
@ -17,7 +17,11 @@
|
|||
|
||||
// Only use SANITIZER_*ATTRIBUTE* before the function return type!
|
||||
#if SANITIZER_WINDOWS
|
||||
# define SANITIZER_INTERFACE_ATTRIBUTE __declspec(dllexport)
|
||||
# if defined(SANITIZER_DLL_THUNK)
|
||||
# define SANITIZER_INTERFACE_ATTRIBUTE
|
||||
# else
|
||||
# define SANITIZER_INTERFACE_ATTRIBUTE __declspec(dllexport)
|
||||
# endif
|
||||
// FIXME find out what we need on Windows, if anything.
|
||||
# define SANITIZER_WEAK_ATTRIBUTE
|
||||
#elif defined(SANITIZER_GO)
|
||||
|
|
Loading…
Reference in New Issue