aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/lit.cfg6
-rw-r--r--test/lit.site.cfg.in1
2 files changed, 7 insertions, 0 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index f7eb7319b9..b3b20c8c4e 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -294,3 +294,9 @@ if llc_props['enable_assertions']:
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")
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index df90b81055..23eb8e228c 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -7,6 +7,7 @@ config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
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.