forked from OSchip/llvm-project
29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
@LIT_SITE_CFG_IN_HEADER@
|
|
|
|
import sys
|
|
|
|
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
|
|
config.flang_obj_root = "@FLANG_BINARY_DIR@"
|
|
config.flang_src_dir = "@FLANG_SOURCE_DIR@"
|
|
config.flang_tools_dir = "@FLANG_TOOLS_DIR@"
|
|
config.flang_intrinsic_modules_dir = "@FLANG_INTRINSIC_MODULES_DIR@"
|
|
config.flang_llvm_tools_dir = "@CMAKE_BINARY_DIR@/bin"
|
|
config.python_executable = "@PYTHON_EXECUTABLE@"
|
|
config.flang_standalone_build = @FLANG_STANDALONE_BUILD@
|
|
|
|
# Support substitution of the tools_dir with user parameters. This is
|
|
# used when we can't determine the tool dir at configuration time.
|
|
try:
|
|
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
|
|
config.flang_tools_dir = config.flang_tools_dir % lit_config.params
|
|
except KeyError:
|
|
e = sys.exc_info()[1]
|
|
key, = e.args
|
|
lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
|
|
|
|
import lit.llvm
|
|
lit.llvm.initialize(lit_config, config)
|
|
|
|
# Let the main config do the real work.
|
|
lit_config.load_config(config, "@FLANG_SOURCE_DIR@/test/lit.cfg.py")
|