[tblgen] Disable lsan weak hook when building with msvc
This change is to fix a link time error when building llvm with msvc. MSVC's implementation does not support weak hook or lsan so this change disables lsan's weak hook definition. Only GCC supports LSan. Tested with visual studio 2019 v16.9.6 Reviewed By: aaron.ballman, rnk Differential Revision: https://reviews.llvm.org/D118162
This commit is contained in:
parent
1f08b08674
commit
14e8bedc98
|
@ -289,7 +289,8 @@ int main(int argc, char **argv) {
|
|||
#define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__) || \
|
||||
#if __has_feature(address_sanitizer) || \
|
||||
(defined(__SANITIZE_ADDRESS__) && defined(__GNUC__)) || \
|
||||
__has_feature(leak_sanitizer)
|
||||
|
||||
#include <sanitizer/lsan_interface.h>
|
||||
|
|
Loading…
Reference in New Issue