"RelWithDebInfo", 'llvm_site_config': os.path.join(llvm_obj_root, 'test', 'lit.site.cfg'), 'llvm_unit_site_config': os.path.join(llvm_obj_root, 'test', 'Unit', 'lit.site.cfg') } clang_obj_root = os.path.join(llvm_obj_root, 'tools', 'clang') if os.path.exists(clang_obj_root): builtin_parameters['clang_site_config'] = \ os.path.join(clang_obj_root, 'test', 'lit.site.cfg') clang_tools_extra_obj_root = os.path.join(clang_obj_root, 'tools', 'extra') if os.path.exists(clang_tools_extra_obj_root): builtin_parameters['clang_tools_extra_site_config'] = \ os.path.join(clang_tools_extra_obj_root, 'test', 'lit.site.cfg') lld_obj_root = os.path.join(llvm_obj_root, 'tools', 'lld') if os.path.exists(lld_obj_root): builtin_parameters['lld_site_config'] = \ os.path.join(lld_obj_root, 'test', 'lit.site.cfg') compilerrt_obj_root = os.path.join(llvm_obj_root, 'projects', 'compiler-rt') if os.path.exists(compilerrt_obj_root): builtin_parameters['compilerrt_site_basedir'] = \ os.path.join(compilerrt_obj_root, 'test') if __name__ == '__main__': import lit lit.main(builtin_parameters)
#!/usr/bin/env python if __name__=='__main__': import lit lit.main()
builtin_parameters = { 'build_mode' : "RelWithDebInfo", 'llvm_site_config' : os.path.join(llvm_obj_root, 'test', 'lit.site.cfg'), 'llvm_unit_site_config' : os.path.join(llvm_obj_root, 'test', 'Unit', 'lit.site.cfg') } clang_obj_root = os.path.join(llvm_obj_root, 'tools', 'clang') if os.path.exists(clang_obj_root): builtin_parameters['clang_site_config'] = \ os.path.join(clang_obj_root, 'test', 'lit.site.cfg') clang_tools_extra_obj_root = os.path.join(clang_obj_root, 'tools', 'extra') if os.path.exists(clang_tools_extra_obj_root): builtin_parameters['clang_tools_extra_site_config'] = \ os.path.join(clang_tools_extra_obj_root, 'test', 'lit.site.cfg') lld_obj_root = os.path.join(llvm_obj_root, 'tools', 'lld') if os.path.exists(lld_obj_root): builtin_parameters['lld_site_config'] = \ os.path.join(lld_obj_root, 'test', 'lit.site.cfg') compilerrt_obj_root = os.path.join(llvm_obj_root, 'projects', 'compiler-rt') if os.path.exists(compilerrt_obj_root): builtin_parameters['compilerrt_site_basedir'] = \ os.path.join(compilerrt_obj_root, 'test') if __name__=='__main__': import lit lit.main(builtin_parameters)
#!/usr/bin/env python # wrapper to run lit from commandline if __name__=='__main__': try: import lit except ImportError: import sys sys.exit('Package lit cannot be imported.\n' \ 'Lit can be installed using: \'python -m pip install lit\'\n' \ '(Python versions older than 2.7.9 or 3.4 do not have pip installed, see:\n' \ 'https://pip.pypa.io/en/latest/installing/)') lit.main()