summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/test/msan/lit.cfg6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler-rt/test/msan/lit.cfg b/compiler-rt/test/msan/lit.cfg
index 550d04d0812..0a5aa75fcc3 100644
--- a/compiler-rt/test/msan/lit.cfg
+++ b/compiler-rt/test/msan/lit.cfg
@@ -20,11 +20,17 @@ if config.host_os == 'FreeBSD':
clang_msan_cflags += ["-lexecinfo"]
clang_msan_cxxflags = config.cxx_mode_flags + clang_msan_cflags
+# Flags for KMSAN invocation. This is C-only, we're not interested in C++.
+clang_kmsan_cflags = (["-fsanitize=kernel-memory"] +
+ [config.target_cflags] +
+ config.debug_info_flags)
+
def build_invocation(compile_flags):
return " " + " ".join([config.clang] + compile_flags) + " "
config.substitutions.append( ("%clang_msan ", build_invocation(clang_msan_cflags)) )
config.substitutions.append( ("%clangxx_msan ", build_invocation(clang_msan_cxxflags)) )
+config.substitutions.append( ("%clang_kmsan ", build_invocation(clang_kmsan_cflags)) )
# Default test suffixes.
config.suffixes = ['.c', '.cc', '.cpp']
OpenPOWER on IntegriCloud