blob: f22063e796deff0b50c2cbba9790647dfffc2f04 [file] [log] [blame]
Eli Friedman3f2828d2021-07-30 20:17:451@LIT_SITE_CFG_IN_HEADER@
2
Tobias Grosser75805372011-04-29 06:27:023config.llvm_src_root = "@LLVM_SOURCE_DIR@"
4config.llvm_obj_root = "@LLVM_BINARY_DIR@"
Sam McCall75acad42022-03-15 22:15:565config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
6config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")
Tobias Grosser75805372011-04-29 06:27:027config.polly_obj_root = "@POLLY_BINARY_DIR@"
Hongbin Zhengc7584ff2012-03-16 14:34:208config.polly_lib_dir = "@POLLY_LIB_DIR@"
Petr Hosek0c0f6cfb2021-12-02 09:04:469config.target_triple = "@LLVM_TARGET_TRIPLE@"
serge_sans_paille24ab9b52019-06-08 15:37:4710config.llvm_polly_link_into_tools = "@LLVM_POLLY_LINK_INTO_TOOLS@"
Tobias Grosser7d136d92017-03-03 03:38:5011config.targets_to_build = "@TARGETS_TO_BUILD@"
Philip Pfaffed99c4062017-07-11 11:24:2512config.extra_paths = "@POLLY_TEST_EXTRA_PATHS@".split(";")
Tobias Grosser75805372011-04-29 06:27:0213
Hongbin Zhenge53bdfe2012-03-29 13:10:1014## Check the current platform with regex
15import re
16EAT_ERR_ON_X86 = ' '
Eisuke Kawashimab605dab2025-01-13 12:00:3517if (re.match(r'^x86_64*', '@LLVM_TARGET_TRIPLE@') is None) :
Hongbin Zhenge53bdfe2012-03-29 13:10:1018 EAT_ERR_ON_X86 = '|| echo \"error is eaten\"'
19
Tobias Grosser7d136d92017-03-03 03:38:5020for arch in config.targets_to_build.split():
21 config.available_features.add(arch.lower() + '-registered-target')
22
Tobias Grosser8fc6cdf2017-07-31 14:03:1623# 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.
26config.excludes = ['Inputs']
27
Wael Yehiac80198b2022-03-14 02:16:2128commonOpts = ' -polly-process-unprofitable ' \
29 + ' -polly-remarks-minimal ' \
30 + ' -polly-use-llvm-names ' \
31 + ' -polly-import-jscop-dir=%S ' \
32 + ' -polly-codegen-verify '
serge_sans_paille24ab9b52019-06-08 15:37:4733if 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':
Eli Friedman15397582024-05-15 05:04:5041 config.substitutions.append(('%loadPolly', '-load '
42 + config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@'
43 + commonOpts ))
44 config.substitutions.append(('%loadNPMPolly', '-load-pass-plugin '
Philip Pfaffe8da7d1d2018-04-17 07:59:4645 + config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@'
Wael Yehiac80198b2022-03-14 02:16:2146 + commonOpts ))
Sebastian Pop7537be92014-03-14 04:04:3647else:
Wael Yehiac80198b2022-03-14 02:16:2148 config.substitutions.append(('%loadPolly', commonOpts ))
Eli Friedman15397582024-05-15 05:04:5049 config.substitutions.append(('%loadNPMPolly', commonOpts ))
50
Eli Friedman3f2828d2021-07-30 20:17:4551import lit.llvm
52lit.llvm.initialize(lit_config, config)
53
Tobias Grosser75805372011-04-29 06:27:0254# Let the main config do the real work.
Daniel Dunbar2bd59a22013-08-09 21:54:3655lit_config.load_config(config, "@POLLY_SOURCE_DIR@/test/lit.cfg")