mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-16 10:26:23 +00:00

This is needed because otherwise if source dir is at location whose path contains non-ASCII character then python will complain about SyntaxError. SyntaxError: Non-ASCII character '\xc4' in file /home/D?vis/libc++/src/build/bin/llvm-lit on line 16, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details Patch by davispuh Differential Revision: https://reviews.llvm.org/D50201 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351113 91177308-0d34-0410-b5e6-96231b3b80d8
34 lines
893 B
Python
Executable File
34 lines
893 B
Python
Executable File
#!/usr/bin/env python
|
|
# -*- 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
|
|
|
|
# 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_mode' : "@BUILD_MODE@" }
|
|
|
|
@LLVM_LIT_CONFIG_MAP@
|
|
|
|
builtin_parameters['config_map'] = config_map
|
|
|
|
if __name__=='__main__':
|
|
from lit.main import main
|
|
main(builtin_parameters)
|