lit.cfg revision 6d1862363c88c183b0ed7740fca876342cf0474b
1# -*- Python -*- 2 3import os 4 5# Setup config name. 6config.name = 'MemorySanitizer' 7 8# Setup source root. 9config.test_source_root = os.path.dirname(__file__) 10 11# Setup default compiler flags used with -fsanitize=memory option. 12clang_msan_cflags = ["-fsanitize=memory", 13 "-mno-omit-leaf-frame-pointer", 14 "-fno-omit-frame-pointer", 15 "-fno-optimize-sibling-calls", 16 "-m64"] + config.debug_info_flags 17clang_msan_cxxflags = config.cxx_mode_flags + clang_msan_cflags 18 19def build_invocation(compile_flags): 20 return " " + " ".join([config.clang] + compile_flags) + " " 21 22config.substitutions.append( ("%clang_msan ", build_invocation(clang_msan_cflags)) ) 23config.substitutions.append( ("%clangxx_msan ", build_invocation(clang_msan_cxxflags)) ) 24 25# Default test suffixes. 26config.suffixes = ['.c', '.cc', '.cpp'] 27 28# MemorySanitizer tests are currently supported on Linux only. 29if config.host_os not in ['Linux']: 30 config.unsupported = True 31