Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / dfsan / lit.cfg.py
blobe947c51f99a5ba8d933867c30af58987fb4bc159
1 # -*- Python -*-
3 import os
5 # Setup config name.
6 config.name = "DataFlowSanitizer" + config.name_suffix
8 # Setup source root.
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