Mercurial > vim
diff src/Make_mvc.mak @ 26589:22896e358a90 v8.2.3824
patch 8.2.3824: no ASAN support for MSVC
Commit: https://github.com/vim/vim/commit/6df0f2759d12ec0bc999b2963ecea4387a2bc516
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Thu Dec 16 13:06:10 2021 +0000
patch 8.2.3824: no ASAN support for MSVC
Problem: No ASAN support for MSVC.
Solution: Add ASAN support and fix a coupld of uncovered problems. (Yegappan
Lakshmanan, closes #9357)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 16 Dec 2021 14:15:02 +0100 |
parents | 13e09dc59f0f |
children | 4b23672d1f0e |
line wrap: on
line diff
--- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -147,6 +147,8 @@ # # Static Code Analysis: ANALYZE=yes (works with VS2012 or later) # +# Address Sanitizer: ASAN=yes (works with VS2019 or later) +# # You can combine any of these interfaces # # Example: To build the non-debug, GUI version with Perl interface: @@ -662,6 +664,12 @@ CFLAGS = $(CFLAGS) -DHAVE_STDINT_H CFLAGS = $(CFLAGS) /analyze !endif +# Address Sanitizer (ASAN) generally available starting with VS2019 version +# 16.9 +!if ("$(ASAN)" == "yes") && ($(MSVC_MAJOR) >= 14) +CFLAGS = $(CFLAGS) /fsanitize=address +!endif + !ifdef NODEBUG VIM = vim ! if "$(OPTIMIZE)" == "SPACE"