summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2018-09-07 09:17:12 +0000
committerAlexander Potapenko <glider@google.com>2018-09-07 09:17:12 +0000
commitf1510528ddc7c6c9a21b16f69e53d033624ec0ab (patch)
treea90a90ea1ad550a71d0cd12e8e6d779a5225f4f6
parent8fe99a0ef28bac6cb247c4b3b56bfcba4fd7b984 (diff)
downloadbcm5719-llvm-f1510528ddc7c6c9a21b16f69e53d033624ec0ab.tar.gz
bcm5719-llvm-f1510528ddc7c6c9a21b16f69e53d033624ec0ab.zip
[MSan] Define %clang_kmsan for KMSAN tests
llvm-svn: 341638
-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