From 9a41f6e7080e7ca6274a460e9e32ba616fa46249 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Thu, 8 Sep 2022 14:37:46 -0400 Subject: [PATCH] Revert "[lldb] Use just-built libcxx for tests when available" This reverts commit c38eeecbc7d929c9601f2189214a7a90d3982a47. --- .../Python/lldbsuite/test/make/Makefile.rules | 19 ------------------- .../test/API/commands/expression/fixits/TestFixIts.py | 2 +- .../TestDbgInfoContentForwardListFromStdModule.py | 5 +++++ lldb/test/API/lang/objc/exceptions/Makefile | 2 +- lldb/test/API/macosx/macCatalyst/Makefile | 2 -- lldb/test/API/python_api/sbmodule/TestSBModule.py | 4 ++-- .../API/tools/lldb-server/TestAppleSimulatorOSType.py | 1 - 7 files changed, 9 insertions(+), 26 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules index c0fd5ec..937a2ae 100644 --- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules @@ -387,16 +387,6 @@ endif #---------------------------------------------------------------------- # C++ standard library options #---------------------------------------------------------------------- -ifneq ($(and $(USE_LIBSTDCPP), $(USE_LIBCPP)),) - $(error Libcxx and Libstdc++ cannot be used together) -endif - -ifeq (1, $(USE_SYSTEM_STDLIB)) - ifneq ($(or $(USE_LIBSTDCPP), $(USE_LIBCPP)),) - $(error Cannot use system's standard library and a custom standard library together) - endif -endif - ifeq (1,$(USE_LIBSTDCPP)) # Clang requires an extra flag: -stdlib=libstdc++ ifneq (,$(findstring clang,$(CC))) @@ -425,15 +415,6 @@ ifeq (1,$(USE_LIBCPP)) endif endif -# If no explicit request was made, but we have paths to a custom libcxx, use -# them. -ifeq ($(or $(USE_LIBSTDCPP), $(USE_LIBCPP), $(USE_SYSTEM_STDLIB)),) - ifneq ($(and $(LIBCPP_INCLUDE_DIR), $(LIBCPP_LIBRARY_DIR)),) - CXXFLAGS += -nostdlib++ -nostdinc++ -cxx-isystem $(LIBCPP_INCLUDE_DIR) - LDFLAGS += -L$(LLVM_LIBS_DIR) -Wl,-rpath,$(LIBCPP_LIBRARY_DIR) -lc++ - endif -endif - #---------------------------------------------------------------------- # Additional system libraries #---------------------------------------------------------------------- diff --git a/lldb/test/API/commands/expression/fixits/TestFixIts.py b/lldb/test/API/commands/expression/fixits/TestFixIts.py index bcc7e61..bf4118d 100644 --- a/lldb/test/API/commands/expression/fixits/TestFixIts.py +++ b/lldb/test/API/commands/expression/fixits/TestFixIts.py @@ -45,7 +45,7 @@ class ExprCommandWithFixits(TestBase): # Try with one error in a top-level expression. # The Fix-It changes "ptr.m" to "ptr->m". - expr = "struct MyTy { int m; }; MyTy x; MyTy *ptr = &x; int m = ptr.m;" + expr = "struct X { int m; }; X x; X *ptr = &x; int m = ptr.m;" value = frame.EvaluateExpression(expr, top_level_options) # A successfully parsed top-level expression will yield an error # that there is 'no value'. If a parsing error would have happened we diff --git a/lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py b/lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py index d794f3b..f9b7219 100644 --- a/lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py +++ b/lldb/test/API/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardListFromStdModule.py @@ -29,3 +29,8 @@ class TestDbgInfoContentForwardList(TestBase): self.expect_expr("std::distance(a.begin(), a.end())", result_value="3") self.expect_expr("a.front().a", result_type="int", result_value="3") self.expect_expr("a.begin()->a", result_type="int", result_value="3") + + # FIXME: The value here isn't actually empty. + self.expect_expr("a.front()", + result_type=value_type, + result_children=[ValueCheck()]) diff --git a/lldb/test/API/lang/objc/exceptions/Makefile b/lldb/test/API/lang/objc/exceptions/Makefile index 355010a..8763401 100644 --- a/lldb/test/API/lang/objc/exceptions/Makefile +++ b/lldb/test/API/lang/objc/exceptions/Makefile @@ -2,7 +2,7 @@ OBJCXX_SOURCES := main.mm CFLAGS_EXTRAS := -w -USE_SYSTEM_STDLIB := 1 + LD_EXTRAS := -framework Foundation include Makefile.rules diff --git a/lldb/test/API/macosx/macCatalyst/Makefile b/lldb/test/API/macosx/macCatalyst/Makefile index 3f08496..d162c33 100644 --- a/lldb/test/API/macosx/macCatalyst/Makefile +++ b/lldb/test/API/macosx/macCatalyst/Makefile @@ -3,8 +3,6 @@ C_SOURCES := main.c override TRIPLE := $(ARCH)-apple-ios13.1-macabi CFLAGS_EXTRAS := -target $(TRIPLE) -USE_SYSTEM_STDLIB := 1 - # FIXME: rdar://problem/54986190 # There is a Clang driver change missing on llvm.org. override CC=xcrun clang diff --git a/lldb/test/API/python_api/sbmodule/TestSBModule.py b/lldb/test/API/python_api/sbmodule/TestSBModule.py index 5a6a8e9..046c9ab 100644 --- a/lldb/test/API/python_api/sbmodule/TestSBModule.py +++ b/lldb/test/API/python_api/sbmodule/TestSBModule.py @@ -47,8 +47,8 @@ class SBModuleAPICase(TestBase): process = target.AttachToProcessWithID(self.dbg.GetListener(), self.background_pid, error) self.assertTrue(error.Success() and process, PROCESS_IS_VALID) - main_module = target.FindModule(lldb.SBFileSpec("a.out")) - self.assertTrue(main_module is not None) + main_module = target.GetModuleAtIndex(0) + self.assertEqual(main_module.GetFileSpec().GetFilename(), "a.out") self.assertFalse(main_module.IsFileBacked(), "The module should not be backed by a file on disk.") diff --git a/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py b/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py index e666f34..1f3afb1 100644 --- a/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py +++ b/lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py @@ -70,7 +70,6 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase): 'SDKROOT': sdkroot.strip(), 'ARCH': arch, 'ARCH_CFLAGS': '-target {} {}'.format(triple, version_min), - 'USE_SYSTEM_STDLIB': 1, }) exe_path = os.path.realpath(self.getBuildArtifact(exe_name)) cmd = [ -- 2.7.4