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-08-01 02:10:44 +08:00
|
|
|
config.flang_llvm_tools_dir = "@CMAKE_BINARY_DIR@/bin"
|
2020-01-15 00:20:49 +08:00
|
|
|
config.python_executable = "@PYTHON_EXECUTABLE@"
|
2020-08-02 03:53:27 +08:00
|
|
|
config.flang_standalone_build = @FLANG_STANDALONE_BUILD@
|
2020-01-15 00:20:49 +08:00
|
|
|
|
2020-09-11 17:17:31 +08:00
|
|
|
# Control the regression test for flang-new driver
|
|
|
|
import lit.util
|
|
|
|
config.include_flang_new_driver_test = \
|
|
|
|
lit.util.pythonize_bool("@FLANG_BUILD_NEW_DRIVER@")
|
|
|
|
|
2020-01-15 00:20:49 +08:00
|
|
|
# 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")
|