Add address sanitizer support for Visual Studio.
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index 4d55ccd..d0e3fd2 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -663,7 +663,6 @@
         CPPCompiler.__init__(self, exelist, version, for_machine, is_cross,
                              info, exe_wrapper, linker=linker, full_version=full_version)
         MSVCCompiler.__init__(self, target)
-        self.base_options = {OptionKey(o) for o in ['b_pch', 'b_vscrt', 'b_ndebug']} # FIXME add lto, pgo and the like
         self.id = 'msvc'
 
     def get_options(self) -> 'KeyedOptionDictType':
diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py
index 3ba0610..2b173eb 100644
--- a/mesonbuild/compilers/mixins/visualstudio.py
+++ b/mesonbuild/compilers/mixins/visualstudio.py
@@ -125,6 +125,8 @@
             self.machine = 'arm'
         else:
             self.machine = target
+        if mesonlib.version_compare(self.version, '>=19.29.29917'):
+            self.base_options.add(mesonlib.OptionKey('b_sanitize'))
         assert self.linker is not None
         self.linker.machine = self.machine
 
@@ -159,6 +161,13 @@
     def get_no_optimization_args(self) -> T.List[str]:
         return ['/Od']
 
+    def sanitizer_compile_args(self, value: str) -> T.List[str]:
+        if value == 'none':
+            return []
+        if value != 'address':
+            raise mesonlib.MesonException('VS only supports address sanitizer at the moment.')
+        return ['/fsanitize=address']
+
     def get_output_args(self, target: str) -> T.List[str]:
         if target.endswith('.exe'):
             return ['/Fe' + target]