mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
cf20fb4e08
The check-* targets run ${Python3_EXECUTABLE} $BUILD/bin/llvm-lit, but running `./bin/llvm-lit $ARGS` from the build directory currently always uses "python" to run llvm-lit. On most systems this will be python2.7 even if we found python3 at CMake time. Reviewed By: compnerd Differential Revision: https://reviews.llvm.org/D84625
31 lines
826 B
Plaintext
Executable File
31 lines
826 B
Plaintext
Executable File
#!@Python3_EXECUTABLE@
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import os
|
|
import sys
|
|
|
|
config_map = {}
|
|
|
|
def map_config(source_dir, site_config):
|
|
global config_map
|
|
source_dir = os.path.realpath(source_dir)
|
|
source_dir = os.path.normcase(source_dir)
|
|
site_config = os.path.normpath(site_config)
|
|
config_map[source_dir] = site_config
|
|
|
|
# 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_mode' : '@BUILD_MODE@' }
|
|
|
|
@LLVM_LIT_CONFIG_MAP@
|
|
|
|
builtin_parameters['config_map'] = config_map
|
|
|
|
# Make sure we can find the lit package.
|
|
llvm_source_root = path(r'@LLVM_SOURCE_DIR@')
|
|
sys.path.insert(0, os.path.join(llvm_source_root, 'utils', 'lit'))
|
|
|
|
if __name__=='__main__':
|
|
from lit.main import main
|
|
main(builtin_parameters)
|