[compiler-rt] r341638 - [MSan] Define %clang_kmsan for KMSAN tests

Alexander Potapenko via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 7 02:17:12 PDT 2018


Author: glider
Date: Fri Sep  7 02:17:12 2018
New Revision: 341638

URL: http://llvm.org/viewvc/llvm-project?rev=341638&view=rev
Log:
[MSan] Define %clang_kmsan for KMSAN tests

Modified:
    compiler-rt/trunk/test/msan/lit.cfg

Modified: compiler-rt/trunk/test/msan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/lit.cfg?rev=341638&r1=341637&r2=341638&view=diff
==============================================================================
--- compiler-rt/trunk/test/msan/lit.cfg (original)
+++ compiler-rt/trunk/test/msan/lit.cfg Fri Sep  7 02:17:12 2018
@@ -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']




More information about the llvm-commits mailing list