brintos

brintos / llvm-project-archived public Read only

0
0
Text · 923 B · b26ff3e Raw
30 lines · python
1# -*- Python -*-2 3import os4 5# Setup config name.6config.name = "DataFlowSanitizer" + config.name_suffix7 8# Setup source root.9config.test_source_root = os.path.dirname(__file__)10 11# Setup default compiler flags used with -fsanitize=dataflow option.12clang_dfsan_cflags = ["-fsanitize=dataflow"] + [config.target_cflags]13 14clang_dfsan_cxxflags = config.cxx_mode_flags + clang_dfsan_cflags15 16 17def build_invocation(compile_flags):18    return " " + " ".join([config.clang] + compile_flags) + " "19 20 21config.substitutions.append(("%clang_dfsan ", build_invocation(clang_dfsan_cflags)))22config.substitutions.append(("%clangxx_dfsan ", build_invocation(clang_dfsan_cxxflags)))23 24# Default test suffixes.25config.suffixes = [".c", ".cpp"]26 27# DataFlowSanitizer tests are currently supported on Linux only.28if not (config.target_os in ["Linux"] and config.target_arch in ["aarch64", "x86_64", "loongarch64"]):29    config.unsupported = True30