1 @LIT_SITE_CFG_IN_HEADER@
3 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
4 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
5 config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
6 config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
7 config.polly_obj_root = "@POLLY_BINARY_DIR@"
8 config.polly_lib_dir = "@POLLY_LIB_DIR@"
9 config.target_triple = "@LLVM_TARGET_TRIPLE@"
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(";")
14 ## Check the current platform with regex
17 if (re.match(r'^x86_64*', '@LLVM_TARGET_TRIPLE@') == None) :
18 EAT_ERR_ON_X86 = '|| echo \"error is eaten\"'
20 for arch in config.targets_to_build.split():
21 config.available_features.add(arch.lower() + '-registered-target')
23 # excludes: A list of directories to exclude from the testsuite. The 'Inputs'
24 # subdirectories contain auxiliary inputs for various tests in their parent
26 config.excludes = ['Inputs']
28 commonOpts = ' -polly-process-unprofitable ' \
29 + ' -polly-remarks-minimal ' \
30 + ' -polly-use-llvm-names ' \
31 + ' -polly-import-jscop-dir=%S ' \
32 + ' -polly-codegen-verify '
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@'
44 config.substitutions.append(('%loadNPMPolly', '-load-pass-plugin '
45 + config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@'
48 config.substitutions.append(('%loadPolly', commonOpts ))
49 config.substitutions.append(('%loadNPMPolly', commonOpts ))
53 lit.llvm.initialize(lit_config, config)
55 # Let the main config do the real work.
56 lit_config.load_config(config, "@POLLY_SOURCE_DIR@/test/lit.cfg")