llvm-capstone/clang/utils/perf-training/lit.site.cfg.in
Alex Denisov d82f494aa4 Replace hardcoded comment at 'lit.site.cfg.in'
At the moment almost every lit.site.cfg.in contains two lines comment:

  ## Autogenerated by LLVM/Clang configuration.
  # Do not edit!

The patch adds variable LIT_SITE_CFG_IN_HEADER, that is replaced from
configure_lit_site_cfg with the note and some useful information.

llvm-svn: 266516
2016-04-16 06:54:46 +00:00

22 lines
770 B
INI

@LIT_SITE_CFG_IN_HEADER@
import sys
config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
config.test_source_root = "@CMAKE_CURRENT_SOURCE_DIR@"
config.target_triple = "@TARGET_TRIPLE@"
config.python_exe = "@PYTHON_EXECUTABLE@"
# Support substitution of the tools and libs dirs with user parameters. This is
# used when we can't determine the tool dir at configuration time.
try:
config.clang_tools_dir = config.clang_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))
# Let the main config do the real work.
lit_config.load_config(config, "@CLANG_SOURCE_DIR@/utils/perf-training/lit.cfg")