]> git.proxmox.com Git - rustc.git/blame - src/compiler-rt/test/dfsan/lit.cfg
New upstream version 1.12.0+dfsg1
[rustc.git] / src / compiler-rt / test / dfsan / lit.cfg
CommitLineData
1a4d82fc
JJ
1# -*- Python -*-
2
3import os
4
5# Setup config name.
5bcae85e 6config.name = 'DataFlowSanitizer' + config.name_suffix
1a4d82fc
JJ
7
8# Setup source root.
9config.test_source_root = os.path.dirname(__file__)
10
11# Setup default compiler flags used with -fsanitize=dataflow option.
5bcae85e 12clang_dfsan_cflags = ["-fsanitize=dataflow", config.target_cflags]
1a4d82fc
JJ
13clang_dfsan_cxxflags = config.cxx_mode_flags + clang_dfsan_cflags
14
15def build_invocation(compile_flags):
16 return " " + " ".join([config.clang] + compile_flags) + " "
17
18config.substitutions.append( ("%clang_dfsan ", build_invocation(clang_dfsan_cflags)) )
19config.substitutions.append( ("%clangxx_dfsan ", build_invocation(clang_dfsan_cxxflags)) )
20
21# Default test suffixes.
22config.suffixes = ['.c', '.cc', '.cpp']
23
24# DataFlowSanitizer tests are currently supported on Linux only.
25if config.host_os not in ['Linux']:
26 config.unsupported = True