From fc9f63966bdaa3d6de21d4c87b3ca5ecd43951ce Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 5 Aug 2025 16:33:39 -0700 Subject: [PATCH] [lldb] Fix test linker flags for binutils ld (cherry picked from commit 027f02dd91661d015430104ecb1b8fdb4fd1afe7) --- .../test/API/lang/swift/expression/import_search_paths/Makefile | 2 +- .../swift/implementation_only_imports/library_indirect/Makefile | 2 +- .../implementation_only_imports/library_resilient/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/test/API/lang/swift/expression/import_search_paths/Makefile b/lldb/test/API/lang/swift/expression/import_search_paths/Makefile index 30e352715f5d3..a23545532afd1 100644 --- a/lldb/test/API/lang/swift/expression/import_search_paths/Makefile +++ b/lldb/test/API/lang/swift/expression/import_search_paths/Makefile @@ -25,6 +25,6 @@ libDirect: $(SRCDIR)/Direct.swift libHidden DYLIB_SWIFT_SOURCES=Direct.swift \ DYLIB_MODULENAME=Direct \ SWIFTFLAGS_EXTRAS="-I$(BUILDDIR)/hidden" \ - LD_EXTRAS="-L$(BUILDDIR)/hidden -lIndirect" \ + LD_EXTRAS="-L$(BUILDDIR)/hidden -lIndirect -Xlinker -rpath -Xlinker $(BUILDDIR)/hidden" \ MAKE_DSYM=NO diff --git a/lldb/test/API/lang/swift/implementation_only_imports/library_indirect/Makefile b/lldb/test/API/lang/swift/implementation_only_imports/library_indirect/Makefile index 68b54ed5b7478..bc364420ea501 100644 --- a/lldb/test/API/lang/swift/implementation_only_imports/library_indirect/Makefile +++ b/lldb/test/API/lang/swift/implementation_only_imports/library_indirect/Makefile @@ -12,7 +12,7 @@ SomeLibraryCore.swiftmodule: SomeLibraryCore.swift SomeLibrary.swiftmodule: SomeLibrary.swift SomeLibraryCore.swiftmodule "$(MAKE)" BASENAME=$(shell basename $@ .swiftmodule) \ - VPATH=$(SRCDIR) -f $(SRCDIR)/../dylib.mk all + VPATH=$(SRCDIR) LD_EXTRAS="-L$(BUILDDIR) -Xlinker -rpath -Xlinker $(BUILDDIR)" -f $(SRCDIR)/../dylib.mk all clean:: rm -rf *.o *.dylib *.so *.dll *.dSYM *.swiftdoc *.swiftmodule *.swiftinterface diff --git a/lldb/test/API/lang/swift/implementation_only_imports/library_resilient/Makefile b/lldb/test/API/lang/swift/implementation_only_imports/library_resilient/Makefile index b2eb2ce814cca..07dc84ee3eb75 100644 --- a/lldb/test/API/lang/swift/implementation_only_imports/library_resilient/Makefile +++ b/lldb/test/API/lang/swift/implementation_only_imports/library_resilient/Makefile @@ -14,7 +14,7 @@ SomeLibraryCore.swiftmodule: SomeLibraryCore.swift SomeLibrary.swiftmodule: SomeLibrary.swift SomeLibraryCore.swiftmodule "$(MAKE)" BASENAME=$(shell basename $@ .swiftmodule) \ SWIFTFLAGS_EXTRAS=-enable-library-evolution \ - VPATH=$(SRCDIR) -f $(SRCDIR)/../dylib.mk all + VPATH=$(SRCDIR) LD_EXTRAS="-L$(BUILDDIR) -Xlinker -rpath -Xlinker $(BUILDDIR)" -f $(SRCDIR)/../dylib.mk all clean:: rm -rf *.o *.dylib *.so *.dll *.dSYM *.swiftdoc *.swiftmodule *.swiftinterface