6 config.name = 'XRay' + config.name_suffix
9 config.test_source_root = os.path.dirname(__file__)
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
16 def build_invocation(compile_flags):
17 return ' ' + ' '.join([config.clang] + compile_flags) + ' '
19 # Setup substitutions.
20 config.substitutions.append(
21 ('%clang ', build_invocation([config.target_cflags])))
22 config.substitutions.append(
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)))
30 # Default test suffixes.
31 config.suffixes = ['.c', '.cc', '.cpp']
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
40 config.unsupported = True
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')