mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-27 03:48:33 +00:00
c1a0c00d50
Prepend the clang library directory (determined using SHLIBDIR, alike in clang) to the LD_LIBRARY_PATH to ensure that just-built clang libraries will be used instead of a previous installed version. When a stand-alone build is performed, LLVM_LIBS_DIR contains the path to installed LLVM library directory. The same directory frequently contains a previously installed version of clang. SHLIBDIR, on the other hand, is always the build-tree directory, and therefore contains the freshly built clang libraries. In a non-stand-alone build, both paths will be the same and therefore including them both will not cause any issues. Differential Revision: https://reviews.llvm.org/D30155 llvm-svn: 309979
27 lines
1.0 KiB
INI
27 lines
1.0 KiB
INI
@LIT_SITE_CFG_IN_HEADER@
|
|
|
|
import sys
|
|
|
|
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
|
|
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
|
|
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
|
|
config.clang_tools_binary_dir = "@CLANG_TOOLS_BINARY_DIR@"
|
|
config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
|
|
config.clang_libs_dir = "@SHLIBDIR@"
|
|
config.python_executable = "@PYTHON_EXECUTABLE@"
|
|
config.target_triple = "@TARGET_TRIPLE@"
|
|
|
|
# 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
|
|
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
|
|
config.llvm_libs_dir = config.llvm_libs_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_TOOLS_SOURCE_DIR@/test/lit.cfg")
|