]> git.proxmox.com Git - rustc.git/blob - src/libcompiler_builtins/compiler-rt/test/xray/lit.cfg
New upstream version 1.20.0+dfsg1
[rustc.git] / src / libcompiler_builtins / compiler-rt / test / xray / lit.cfg
1 # -*- Python -*-
2
3 import os
4
5 # Setup config name.
6 config.name = 'XRay' + config.name_suffix
7
8 # Setup source root.
9 config.test_source_root = os.path.dirname(__file__)
10
11 # Setup default compiler flags use with -fxray-instrument option.
12 clang_xray_cflags = (['-fxray-instrument', config.target_cflags])
13 clang_xray_cxxflags = config.cxx_mode_flags + clang_xray_cflags
14
15
16 def build_invocation(compile_flags):
17 return ' ' + ' '.join([config.clang] + compile_flags) + ' '
18
19 # Setup substitutions.
20 config.substitutions.append(
21 ('%clang ', build_invocation([config.target_cflags])))
22 config.substitutions.append(
23 ('%clangxx ',
24 build_invocation(config.cxx_mode_flags + [config.target_cflags])))
25 config.substitutions.append(
26 ('%clang_xray ', build_invocation(clang_xray_cflags)))
27 config.substitutions.append(
28 ('%clangxx_xray', build_invocation(clang_xray_cxxflags)))
29
30 # Default test suffixes.
31 config.suffixes = ['.c', '.cc', '.cpp']
32
33 if config.host_os not in ['Linux']:
34 config.unsupported = True
35 elif '64' not in config.host_arch:
36 if 'arm' in config.host_arch:
37 if '-mthumb' in config.target_cflags:
38 config.unsupported = True
39 else:
40 config.unsupported = True
41
42 # Allow tests to use REQUIRES=stable-runtime. For use when you cannot use XFAIL
43 # e.g. because the test sometimes passes, sometimes fails.
44 if config.target_arch != 'aarch64':
45 config.available_features.add('stable-runtime')