diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
4 files changed, 16 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/builders/builder.py b/lldb/packages/Python/lldbsuite/test/builders/builder.py index 9805706..cb82dd4 100644 --- a/lldb/packages/Python/lldbsuite/test/builders/builder.py +++ b/lldb/packages/Python/lldbsuite/test/builders/builder.py @@ -120,6 +120,11 @@ class Builder: configuration.clang_module_cache_dir)] return [] + def getLibCxxArgs(self): + if configuration.hermetic_libcxx: + return ["USE_HERMETIC_LIBCPP=1"] + return [] + def _getDebugInfoArgs(self, debug_info): if debug_info is None: return [] @@ -142,7 +147,7 @@ class Builder: self.getArchCFlags(architecture), self.getArchSpec(architecture), self.getCCSpec(compiler), self.getExtraMakeArgs(), self.getSDKRootSpec(), self.getModuleCacheSpec(), - self.getCmdLine(dictionary)] + self.getLibCxxArgs(), self.getCmdLine(dictionary)] command = list(itertools.chain(*command_parts)) return command diff --git a/lldb/packages/Python/lldbsuite/test/configuration.py b/lldb/packages/Python/lldbsuite/test/configuration.py index 6b3da8f..c29a44e 100644 --- a/lldb/packages/Python/lldbsuite/test/configuration.py +++ b/lldb/packages/Python/lldbsuite/test/configuration.py @@ -124,6 +124,9 @@ all_tests = set() # LLDB library directory. lldb_libs_dir = None +# Force us to use the just-built libcxx +hermetic_libcxx = False + # A plugin whose tests will be enabled, like intel-pt. enabled_plugins = [] diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py index a9ca741..ee59500 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest.py +++ b/lldb/packages/Python/lldbsuite/test/dotest.py @@ -281,6 +281,11 @@ def parseOptionsAndInitTestdirs(): logging.warning('No valid FileCheck executable; some tests may fail...') logging.warning('(Double-check the --llvm-tools-dir argument to dotest.py)') + configuration.hermetic_libcxx = args.hermetic_libcxx + if configuration.hermetic_libcxx and args.lldb_platform_name: + configuration.hermetic_libcxx = False + logging.warning('Hermetic libc++ is not supported for remote runs: ignoring --hermetic-libcxx') + if args.channels: lldbtest_config.channels = args.channels diff --git a/lldb/packages/Python/lldbsuite/test/dotest_args.py b/lldb/packages/Python/lldbsuite/test/dotest_args.py index aac2fec..768b052 100644 --- a/lldb/packages/Python/lldbsuite/test/dotest_args.py +++ b/lldb/packages/Python/lldbsuite/test/dotest_args.py @@ -43,6 +43,8 @@ def create_parser(): if sys.platform == 'darwin': group.add_argument('--apple-sdk', metavar='apple_sdk', dest='apple_sdk', default="", help=textwrap.dedent( '''Specify the name of the Apple SDK (macosx, macosx.internal, iphoneos, iphoneos.internal, or path to SDK) and use the appropriate tools from that SDK's toolchain.''')) + group.add_argument('--hermetic-libcxx', action='store_true', help=textwrap.dedent( + '''Force the just-built libcxx to be used for the libc++ formatter tests.''')) # FIXME? This won't work for different extra flags according to each arch. group.add_argument( '-E', |