mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-11 21:56:15 +00:00
7a9572f8af
This doesn't seem ideal, perhaps we could just keep the llvm_site_cfg and have other config (clang and clang-tools-extra) derive their site_cfg from that. Suggestions/complaints/ideas welcome. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163171 91177308-0d34-0410-b5e6-96231b3b80d8
34 lines
1.1 KiB
Python
Executable File
34 lines
1.1 KiB
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import os
|
|
import sys
|
|
|
|
# Variables configured at build time.
|
|
llvm_source_root = "@LLVM_SOURCE_DIR@"
|
|
llvm_obj_root = "@LLVM_BINARY_DIR@"
|
|
|
|
# Make sure we can find the lit package.
|
|
sys.path.insert(0, os.path.join(llvm_source_root, 'utils', 'lit'))
|
|
|
|
# Set up some builtin parameters, so that by default the LLVM test suite
|
|
# configuration file knows how to find the object tree.
|
|
builtin_parameters = {
|
|
'build_config' : "@CMAKE_CFG_INTDIR@",
|
|
'build_mode' : "@RUNTIME_BUILD_MODE@",
|
|
'llvm_site_config' : os.path.join(llvm_obj_root, 'test', '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')
|
|
|
|
if __name__=='__main__':
|
|
import lit
|
|
lit.main(builtin_parameters)
|