diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
4 files changed, 29 insertions, 8 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/configuration.py b/lldb/packages/Python/lldbsuite/test/configuration.py index 685f491..dbd4a2d 100644 --- a/lldb/packages/Python/lldbsuite/test/configuration.py +++ b/lldb/packages/Python/lldbsuite/test/configuration.py @@ -119,6 +119,7 @@ all_tests = set() # LLDB library directory. lldb_libs_dir = None +lldb_obj_root = None libcxx_include_dir = None libcxx_include_target_dir = None diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index 2ec4a84..ebabf34 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -423,6 +423,7 @@ def parseOptionsAndInitTestdirs(): configuration.lldb_module_cache_dir = os.path.join( configuration.test_build_dir, "module-cache-lldb" ) + if args.clang_module_cache_dir: configuration.clang_module_cache_dir = args.clang_module_cache_dir else: @@ -432,6 +433,8 @@ def parseOptionsAndInitTestdirs(): if args.lldb_libs_dir: configuration.lldb_libs_dir = args.lldb_libs_dir + if args.lldb_obj_root: + configuration.lldb_obj_root = args.lldb_obj_root if args.enabled_plugins: configuration.enabled_plugins = args.enabled_plugins diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py b/lldb/packages/Python/lldbsuite/test/dotest_args.py index e4de786..8b00c7a 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest_args.py +++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py @@ -237,10 +237,16 @@ def create_parser(): help="The clang module cache directory used in the Make files by Clang while building tests. Defaults to <test build directory>/module-cache-clang.", ) group.add_argument( + "--lldb-obj-root", + dest="lldb_obj_root", + metavar="path", + help="The path to the LLDB object files.", + ) + group.add_argument( "--lldb-libs-dir", dest="lldb_libs_dir", metavar="path", - help="The path to LLDB library directory (containing liblldb)", + help="The path to LLDB library directory (containing liblldb).", ) group.add_argument( "--enable-plugin", diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index 7a7afec..591e834 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -1473,11 +1473,12 @@ class Base(unittest.TestCase): d = { "CXX_SOURCES": sources, "EXE": exe_name, - "CFLAGS_EXTRAS": "%s %s -I%s" + "CFLAGS_EXTRAS": "%s %s -I%s -I%s" % ( stdflag, stdlibflag, os.path.join(os.environ["LLDB_SRC"], "include"), + os.path.join(configuration.lldb_obj_root, "include"), ), "LD_EXTRAS": "-L%s -lliblldb" % lib_dir, } @@ -1485,11 +1486,12 @@ class Base(unittest.TestCase): d = { "CXX_SOURCES": sources, "EXE": exe_name, - "CFLAGS_EXTRAS": "%s %s -I%s" + "CFLAGS_EXTRAS": "%s %s -I%s -I%s" % ( stdflag, stdlibflag, os.path.join(os.environ["LLDB_SRC"], "include"), + os.path.join(configuration.lldb_obj_root, "include"), ), "LD_EXTRAS": "-L%s -llldb -Wl,-rpath,%s" % (lib_dir, lib_dir), } @@ -1508,7 +1510,8 @@ class Base(unittest.TestCase): d = { "DYLIB_CXX_SOURCES": sources, "DYLIB_NAME": lib_name, - "CFLAGS_EXTRAS": "%s -stdlib=libc++" % stdflag, + "CFLAGS_EXTRAS": "%s -stdlib=libc++ -I%s" + % (stdflag, os.path.join(configuration.lldb_obj_root, "include")), "FRAMEWORK_INCLUDES": "-F%s" % self.framework_dir, "LD_EXTRAS": "%s -Wl,-rpath,%s -dynamiclib" % (self.lib_lldb, self.framework_dir), @@ -1517,16 +1520,24 @@ class Base(unittest.TestCase): d = { "DYLIB_CXX_SOURCES": sources, "DYLIB_NAME": lib_name, - "CFLAGS_EXTRAS": "%s -I%s " - % (stdflag, os.path.join(os.environ["LLDB_SRC"], "include")), + "CFLAGS_EXTRAS": "%s -I%s -I%s" + % ( + stdflag, + os.path.join(os.environ["LLDB_SRC"], "include"), + os.path.join(configuration.lldb_obj_root, "include"), + ), "LD_EXTRAS": "-shared -l%s\liblldb.lib" % lib_dir, } else: d = { "DYLIB_CXX_SOURCES": sources, "DYLIB_NAME": lib_name, - "CFLAGS_EXTRAS": "%s -I%s -fPIC" - % (stdflag, os.path.join(os.environ["LLDB_SRC"], "include")), + "CFLAGS_EXTRAS": "%s -I%s -I%s -fPIC" + % ( + stdflag, + os.path.join(os.environ["LLDB_SRC"], "include"), + os.path.join(configuration.lldb_obj_root, "include"), + ), "LD_EXTRAS": "-shared -L%s -llldb -Wl,-rpath,%s" % (lib_dir, lib_dir), } if self.TraceOn(): |