Index: lldb/packages/Python/lldbsuite/test/configuration.py =================================================================== --- lldb/packages/Python/lldbsuite/test/configuration.py +++ lldb/packages/Python/lldbsuite/test/configuration.py @@ -136,6 +136,10 @@ # same base name. all_tests = set() +# The suffix appended to 'lib' directory, used to find LLDB library. +libdir_suffix = '' + + def shouldSkipBecauseOfCategories(test_categories): if use_categories: if len(test_categories) == 0 or len( Index: lldb/packages/Python/lldbsuite/test/dotest.py =================================================================== --- lldb/packages/Python/lldbsuite/test/dotest.py +++ lldb/packages/Python/lldbsuite/test/dotest.py @@ -452,6 +452,9 @@ os.environ['CLANG_MODULE_CACHE_DIR'] = configuration.clang_module_cache_dir + if args.libdir_suffix: + configuration.libdir_suffix = args.libdir_suffix + # Gather all the dirs passed on the command line. if len(args.args) > 0: configuration.testdirs = [os.path.realpath(os.path.abspath(x)) for x in args.args] Index: lldb/packages/Python/lldbsuite/test/dotest_args.py =================================================================== --- lldb/packages/Python/lldbsuite/test/dotest_args.py +++ lldb/packages/Python/lldbsuite/test/dotest_args.py @@ -172,6 +172,11 @@ dest='clang_module_cache_dir', metavar='The clang module cache directory used by Clang', help='The clang module cache directory used in the Make files by Clang while building tests. Defaults to /module-cache-clang.') + group.add_argument( + '--libdir-suffix', + dest='libdir_suffix', + metavar='suffix', + help='The suffix appended to "lib" directory, e.g. "64"') # Configuration options group = parser.add_argument_group('Remote platform options') Index: lldb/packages/Python/lldbsuite/test/lldbtest.py =================================================================== --- lldb/packages/Python/lldbsuite/test/lldbtest.py +++ lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -1426,7 +1426,9 @@ os.path.join( os.environ["LLDB_SRC"], "include")), - 'LD_EXTRAS': "-L%s/../lib -llldb -Wl,-rpath,%s/../lib" % (lib_dir, lib_dir)} + 'LD_EXTRAS': "-L%s/../lib%s -llldb -Wl,-rpath,%s/../lib%s" % ( + lib_dir, configuration.libdir_suffix, + lib_dir, configuration.libdir_suffix)} if self.TraceOn(): print( "Building LLDB Driver (%s) from sources %s" % Index: lldb/test/API/lit.cfg.py =================================================================== --- lldb/test/API/lit.cfg.py +++ lldb/test/API/lit.cfg.py @@ -114,6 +114,9 @@ if config.filecheck: dotest_cmd += ['--filecheck', config.filecheck] +if config.libdir_suffix: + dotest_cmd += ['--libdir-suffix', config.libdir_suffix] + # We don't want to force users passing arguments to lit to use `;` as a # separator. We use Python's simple lexical analyzer to turn the args into a # list. Pass there arguments last so they can override anything that was Index: lldb/test/API/lit.site.cfg.py.in =================================================================== --- lldb/test/API/lit.site.cfg.py.in +++ lldb/test/API/lit.site.cfg.py.in @@ -10,6 +10,7 @@ config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" config.lldb_obj_root = "@LLDB_BINARY_DIR@" config.lldb_src_root = "@LLDB_SOURCE_DIR@" +config.libdir_suffix = "@LLVM_LIBDIR_SUFFIX@" config.cmake_cxx_compiler = "@CMAKE_CXX_COMPILER@" config.host_os = "@HOST_OS@" config.host_triple = "@LLVM_HOST_TRIPLE@"