236
|
1 @LIT_SITE_CFG_IN_HEADER@
|
|
2
|
150
|
3 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
|
|
4 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
|
236
|
5 config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
|
|
6 config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
|
150
|
7 config.polly_obj_root = "@POLLY_BINARY_DIR@"
|
|
8 config.polly_lib_dir = "@POLLY_LIB_DIR@"
|
236
|
9 config.target_triple = "@LLVM_TARGET_TRIPLE@"
|
150
|
10 config.llvm_polly_link_into_tools = "@LLVM_POLLY_LINK_INTO_TOOLS@"
|
|
11 config.targets_to_build = "@TARGETS_TO_BUILD@"
|
|
12 config.extra_paths = "@POLLY_TEST_EXTRA_PATHS@".split(";")
|
|
13
|
|
14 ## Check the current platform with regex
|
|
15 import re
|
|
16 EAT_ERR_ON_X86 = ' '
|
236
|
17 if (re.match(r'^x86_64*', '@LLVM_TARGET_TRIPLE@') == None) :
|
150
|
18 EAT_ERR_ON_X86 = '|| echo \"error is eaten\"'
|
|
19
|
|
20 for arch in config.targets_to_build.split():
|
|
21 config.available_features.add(arch.lower() + '-registered-target')
|
|
22
|
|
23 # excludes: A list of directories to exclude from the testsuite. The 'Inputs'
|
|
24 # subdirectories contain auxiliary inputs for various tests in their parent
|
|
25 # directories.
|
|
26 config.excludes = ['Inputs']
|
|
27
|
236
|
28 commonOpts = ' -polly-process-unprofitable ' \
|
|
29 + ' -polly-remarks-minimal ' \
|
|
30 + ' -polly-use-llvm-names ' \
|
|
31 + ' -polly-import-jscop-dir=%S ' \
|
|
32 + ' -polly-codegen-verify '
|
150
|
33 if config.llvm_polly_link_into_tools == '' or \
|
|
34 config.llvm_polly_link_into_tools.lower() == '0' or \
|
|
35 config.llvm_polly_link_into_tools.lower() == 'n' or \
|
|
36 config.llvm_polly_link_into_tools.lower() == 'no' or \
|
|
37 config.llvm_polly_link_into_tools.lower() == 'off' or \
|
|
38 config.llvm_polly_link_into_tools.lower() == 'false' or \
|
|
39 config.llvm_polly_link_into_tools.lower() == 'notfound' or \
|
|
40 config.llvm_polly_link_into_tools.lower() == 'llvm_polly_link_into_tools-notfound':
|
|
41 config.substitutions.append(('%loadPolly', '-load '
|
|
42 + config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@'
|
236
|
43 + commonOpts ))
|
|
44 config.substitutions.append(('%loadNPMPolly', '-load-pass-plugin '
|
150
|
45 + config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@'
|
236
|
46 + commonOpts ))
|
150
|
47 else:
|
236
|
48 config.substitutions.append(('%loadPolly', commonOpts ))
|
|
49 config.substitutions.append(('%loadNPMPolly', commonOpts ))
|
|
50
|
150
|
51
|
236
|
52 import lit.llvm
|
|
53 lit.llvm.initialize(lit_config, config)
|
|
54
|
150
|
55 # Let the main config do the real work.
|
|
56 lit_config.load_config(config, "@POLLY_SOURCE_DIR@/test/lit.cfg")
|