52 lines · plain
1@LIT_SITE_CFG_IN_HEADER@2 3config.llvm_src_root = "@LLVM_SOURCE_DIR@"4config.llvm_obj_root = "@LLVM_BINARY_DIR@"5config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")6config.llvm_libs_dir = lit_config.substitute("@LLVM_LIBS_DIR@")7config.polly_obj_root = "@POLLY_BINARY_DIR@"8config.polly_lib_dir = "@POLLY_LIB_DIR@"9config.target_triple = "@LLVM_TARGET_TRIPLE@"10config.llvm_polly_link_into_tools = "@LLVM_POLLY_LINK_INTO_TOOLS@"11config.targets_to_build = "@TARGETS_TO_BUILD@"12config.extra_paths = "@POLLY_TEST_EXTRA_PATHS@".split(";")13 14## Check the current platform with regex15import re16EAT_ERR_ON_X86 = ' '17if (re.match(r'^x86_64*', '@LLVM_TARGET_TRIPLE@') is None) :18 EAT_ERR_ON_X86 = '|| echo \"error is eaten\"'19 20for 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 parent25# directories.26config.excludes = ['Inputs']27 28commonOpts = ' -polly-process-unprofitable ' \29 + ' -polly-remarks-minimal ' \30 + ' -polly-use-llvm-names ' \31 + ' -polly-import-jscop-dir=%S ' \32 + ' -polly-codegen-verify '33if 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(('%loadNPMPolly', '-load-pass-plugin '42 + config.polly_lib_dir + '/LLVMPolly@LLVM_SHLIBEXT@'43 + commonOpts ))44else:45 config.substitutions.append(('%loadNPMPolly', commonOpts ))46 47import lit.llvm48lit.llvm.initialize(lit_config, config)49 50# Let the main config do the real work.51lit_config.load_config(config, "@POLLY_SOURCE_DIR@/test/lit.cfg")52