if lit.util.which('xmllint'):
config.available_features.add('xmllint')
+# Sanitizers.
+if config.llvm_use_sanitizer == "Address":
+ config.available_features.add("asan")
+if (config.llvm_use_sanitizer == "Memory" or
+ config.llvm_use_sanitizer == "MemoryWithOrigins"):
+ config.available_features.add("msan")
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.clang_obj_root = "@CLANG_BINARY_DIR@"
config.target_triple = "@TARGET_TRIPLE@"
+config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
# Support substitution of the tools and libs dirs with user parameters. This is
# used when we can't determine the tool dir at configuration time.