]> git.proxmox.com Git - rustc.git/blame - src/libcompiler_builtins/compiler-rt/test/msan/lit.cfg
New upstream version 1.25.0+dfsg1
[rustc.git] / src / libcompiler_builtins / compiler-rt / test / msan / lit.cfg
CommitLineData
1a4d82fc
JJ
1# -*- Python -*-
2
3import os
4
5# Setup config name.
5bcae85e 6config.name = 'MemorySanitizer' + getattr(config, 'name_suffix', 'default')
1a4d82fc
JJ
7
8# Setup source root.
9config.test_source_root = os.path.dirname(__file__)
10
11# Setup default compiler flags used with -fsanitize=memory option.
5bcae85e
SL
12clang_msan_cflags = (["-fsanitize=memory",
13 "-mno-omit-leaf-frame-pointer",
14 "-fno-omit-frame-pointer",
15 "-fno-optimize-sibling-calls"] +
16 [config.target_cflags] +
17 config.debug_info_flags)
92a42be0
SL
18# Some Msan tests leverage backtrace() which requires libexecinfo on FreeBSD.
19if config.host_os == 'FreeBSD':
20 clang_msan_cflags += ["-lexecinfo"]
1a4d82fc
JJ
21clang_msan_cxxflags = config.cxx_mode_flags + clang_msan_cflags
22
23def build_invocation(compile_flags):
24 return " " + " ".join([config.clang] + compile_flags) + " "
25
26config.substitutions.append( ("%clang_msan ", build_invocation(clang_msan_cflags)) )
27config.substitutions.append( ("%clangxx_msan ", build_invocation(clang_msan_cxxflags)) )
28
29# Default test suffixes.
30config.suffixes = ['.c', '.cc', '.cpp']
31
2c00a5a8 32if config.host_os not in ['Linux', 'NetBSD']:
1a4d82fc 33 config.unsupported = True
5bcae85e 34
7cac9316
XL
35# For mips64, mips64el we have forced store_context_size to 1 because these
36# archs use slow unwinder which is not async signal safe. Therefore we only
37# check the first frame since store_context size is 1.
38if config.host_arch in ['mips64', 'mips64el']:
39 config.substitutions.append( ('CHECK-%short-stack', 'CHECK-SHORT-STACK'))
40else:
41 config.substitutions.append( ('CHECK-%short-stack', 'CHECK-FULL-STACK'))