2020-01-15 00:20:49 +08:00
|
|
|
@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@"
|
2020-01-28 20:58:30 +08:00
|
|
|
config.flang_intrinsic_modules_dir = "@FLANG_INTRINSIC_MODULES_DIR@"
|
2020-05-04 22:25:02 +08:00
|
|
|
config.flang_llvm_tools_dir = "@CMAKE_BINARY_DIR@/bin"
|
2020-01-15 00:20:49 +08:00
|
|
|
config.python_executable = "@PYTHON_EXECUTABLE@"
|
|
|
|
|
|
|
|
# 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.
|
2020-03-06 19:21:36 +08:00
|
|
|
lit_config.load_config(config, "@FLANG_SOURCE_DIR@/test/lit.cfg.py")
|