diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-08-22 12:56:13 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-08-22 12:56:13 +0200 |
commit | 0a0b420d866f070d4b1208bb3c4451398797c6ef (patch) | |
tree | d9dc111ef03125e8f0f1ce6fa6c2ec9af3588787 /cmake/compiler | |
parent | f4297aa3c634f321e2159be54835d4b2272874f4 (diff) |
Build: Support ASAN on msvc
Diffstat (limited to 'cmake/compiler')
-rw-r--r-- | cmake/compiler/msvc/settings.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake index fc1b8122af5..36930733bb2 100644 --- a/cmake/compiler/msvc/settings.cmake +++ b/cmake/compiler/msvc/settings.cmake @@ -159,6 +159,19 @@ target_compile_options(trinity-compile-option-interface /we4263 /we4264) +if(ASAN) + target_compile_definitions(trinity-compile-option-interface + INTERFACE + -D_DISABLE_STRING_ANNOTATION + -D_DISABLE_VECTOR_ANNOTATION) + + target_compile_options(trinity-compile-option-interface + INTERFACE + /fsanitize=address) + + message(STATUS "MSVC: Enabled Address Sanitizer ASan") +endif() + # Disable incremental linking in debug builds. # To prevent linking getting stuck (which might be fixed in a later VS version). macro(DisableIncrementalLinking variable) |