6 config.name = 'DataFlowSanitizer'
9 config.test_source_root = os.path.dirname(__file__)
11 # Setup default compiler flags used with -fsanitize=dataflow option.
12 clang_dfsan_cflags = ["-fsanitize=dataflow"]
13 clang_dfsan_cxxflags = config.cxx_mode_flags + clang_dfsan_cflags
15 def build_invocation(compile_flags):
16 return " " + " ".join([config.clang] + compile_flags) + " "
18 config.substitutions.append( ("%clang_dfsan ", build_invocation(clang_dfsan_cflags)) )
19 config.substitutions.append( ("%clangxx_dfsan ", build_invocation(clang_dfsan_cxxflags)) )
21 # Default test suffixes.
22 config.suffixes = ['.c', '.cc', '.cpp']
24 # DataFlowSanitizer tests are currently supported on Linux only.
25 if config.host_os not in ['Linux']:
26 config.unsupported = True