6 config
.name
= "DataFlowSanitizer" + config
.name_suffix
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"] + [config
.target_cflags
]
14 clang_dfsan_cxxflags
= config
.cxx_mode_flags
+ clang_dfsan_cflags
17 def build_invocation(compile_flags
):
18 return " " + " ".join([config
.clang
] + compile_flags
) + " "
21 config
.substitutions
.append(("%clang_dfsan ", build_invocation(clang_dfsan_cflags
)))
22 config
.substitutions
.append(("%clangxx_dfsan ", build_invocation(clang_dfsan_cxxflags
)))
24 # Default test suffixes.
25 config
.suffixes
= [".c", ".cpp"]
27 # DataFlowSanitizer tests are currently supported on Linux only.
28 if not (config
.host_os
in ["Linux"] and config
.target_arch
in ["aarch64", "x86_64", "loongarch64"]):
29 config
.unsupported
= True