Skip to content

Commit 335c3bc

Browse files
committed
Update test Makefile for upstream Makefile.rules changes
The whole ARCHIVE facility, which was only used by a single test, has been removed by https://reviews.llvm.org/D94890. rdar://82038349
1 parent 6ad6d7c commit 335c3bc

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

lldb/test/API/lang/swift/parseable_interfaces/static/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,23 @@ staticA:
2121
# Because we override VPATH to point to the build directory, we need to pass
2222
# down SWIFTC too (it's default value is relative to VPATH)
2323
$(MAKE) MAKE_DSYM=$(MAKE_DSYM) CC=$(CC) SWIFTC=$(SWIFTC) \
24-
ARCH=$(ARCH) DSYMUTIL=$(DSYMUTIL) VPATH=$(BUILDDIR) SWIFTSDKROOT=$(SWIFTSDKROOT) \
24+
ARCH=$(ARCH) DSYMUTIL=$(DSYMUTIL) VPATH=$(BUILDDIR) \
25+
SWIFTSDKROOT=$(SWIFTSDKROOT) \
2526
SWIFT_MODULE_CACHE_FLAGS="$(SWIFT_MODULE_CACHE_FLAGS)" \
2627
BASENAME=AA -f $(SRCDIR)/libs/Makefile static_only
2728

2829
staticB:
2930
$(MAKE) MAKE_DSYM=$(MAKE_DSYM) CC=$(CC) SWIFTC=$(SWIFTC) \
30-
ARCH=$(ARCH) DSYMUTIL=$(DSYMUTIL) VPATH=$(BUILDDIR) SWIFTSDKROOT=$(SWIFTSDKROOT) \
31+
ARCH=$(ARCH) DSYMUTIL=$(DSYMUTIL) VPATH=$(BUILDDIR) \
32+
SWIFTSDKROOT=$(SWIFTSDKROOT) \
3133
SWIFT_MODULE_CACHE_FLAGS="$(SWIFT_MODULE_CACHE_FLAGS)" \
3234
BASENAME=BB SWIFTFLAGS_EXTRAS="-I$(BUILDDIR)" \
3335
LD_EXTRAS="-L$(BUILDDIR)" -f $(SRCDIR)/libs/Makefile static_only
3436

3537
staticC:
3638
$(MAKE) MAKE_DSYM=$(MAKE_DSYM) CC=$(CC) SWIFTC=$(SWIFTC) \
37-
ARCH=$(ARCH) DSYMUTIL=$(DSYMUTIL) VPATH=$(BUILDDIR) SWIFTSDKROOT=$(SWIFTSDKROOT) \
39+
ARCH=$(ARCH) DSYMUTIL=$(DSYMUTIL) VPATH=$(BUILDDIR) \
40+
SWIFTSDKROOT=$(SWIFTSDKROOT) \
3841
SWIFT_MODULE_CACHE_FLAGS="$(SWIFT_MODULE_CACHE_FLAGS)" \
3942
BASENAME=CC -f $(SRCDIR)/libs/Makefile static_only
4043

lldb/test/API/lang/swift/parseable_interfaces/static/libs/Makefile

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,24 @@
33
DYLIB_NAME := $(BASENAME)
44
DYLIB_SWIFT_SOURCES := libs/$(BASENAME).swift
55

6-
# Don't use the default swift flags, as we don't want -g for the libraries in
7-
# this test.
8-
SWIFTFLAGS=-Onone -Xfrontend -serialize-debugging-options -parse-as-library -enable-library-evolution
6+
# Don't use -g for the libraries in this test.
7+
DEBUG_INFO_FLAG :=
8+
SWIFTFLAGS_EXTRAS := -enable-library-evolution
99

1010
# Don't include the wrapped .swiftmodule on Linux to make sure we use
1111
# the .swiftinterface. The issue here is that if the .swiftmodule is wrapped
1212
# and linked into the library, LLDB may find it there and load it before the
1313
# .swiftinterface loading path can be exercised.
1414
EXCLUDE_WRAPPED_SWIFTMODULE=1
1515

16-
# Activates the rules for generating a static lib based on the .o files
17-
# corresponding to the dylib swift sources above.
18-
ARCHIVE_NAME := lib$(BASENAME).a
19-
ARCHIVE_OBJECTS = $(strip $(DYLIB_SWIFT_SOURCES:.swift=.o))
20-
21-
$(ARCHIVE_NAME): $(BASENAME).swiftmodule
22-
2316
include Makefile.rules
2417

25-
# Generate only the static lib (all would generate a dylib as well).
18+
# These are *not* Makefile.rules config variables.
19+
ARCHIVE_NAME := lib$(BASENAME).a
20+
ARCHIVE_OBJECTS := $(strip $(DYLIB_SWIFT_SOURCES:.swift=.o))
21+
$(ARCHIVE_NAME): $(ARCHIVE_OBJECTS) $(BASENAME).swiftmodule
22+
$(AR) $(ARFLAGS) $@ $<
23+
2624
static_only: $(ARCHIVE_NAME)
2725

2826
clean::

0 commit comments

Comments
 (0)