diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2021-12-16 13:06:10 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-16 13:06:10 +0000 |
commit | 6df0f2759d12ec0bc999b2963ecea4387a2bc516 (patch) | |
tree | e0123e1cb1c5270f76f16a4da69c74b903eff634 /src/Make_mvc.mak | |
parent | 6ecf58b0d7d9b8fbba780d19d2e6c0f227df715b (diff) | |
download | vim-git-6df0f2759d12ec0bc999b2963ecea4387a2bc516.tar.gz |
patch 8.2.3824: no ASAN support for MSVCv8.2.3824
Problem: No ASAN support for MSVC.
Solution: Add ASAN support and fix a coupld of uncovered problems. (Yegappan
Lakshmanan, closes #9357)
Diffstat (limited to 'src/Make_mvc.mak')
-rw-r--r-- | src/Make_mvc.mak | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index 6be13fba6..2417d7727 100644 --- 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" |