Skip to content

Allow Swift to enable LLDB tests in Windows CI #9513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
bd653f9
[lldb] Use SEND_ERROR instead of FATAL_ERROR in test/CMakeLists.txt (…
JDevlieghere Oct 9, 2024
9406ee5
[lldb] Check for Python 'packaging' module at configuration time (#11…
weliveindetail Oct 10, 2024
7e801d1
[lldb] Add early CMake check for 'make' tool (#111531)
weliveindetail Oct 10, 2024
c22caa1
[lldb] Fix deps loading for lldb-python on Windows and Python3.8+ (#9…
weliveindetail Oct 2, 2024
1c46691
[lldb] Support tests with nested make invocations on Windows 1/2 (#11…
weliveindetail Oct 15, 2024
5ec38f7
[lldb] Support tests with nested make invocations on Windows 2/2 (#11…
weliveindetail Oct 16, 2024
977780e
[lldb] Support even more swiftlang tests with nested make invocations…
weliveindetail Oct 15, 2024
7302c51
[lldb][test] Propagate SDKROOT env var in Shell tests on Windows
weliveindetail Oct 14, 2024
6c81253
[lldb][swift] Check runtime dependencies of SwiftREPL tests in local …
weliveindetail Oct 15, 2024
a6470fc
[lldb] Relax check for breakpoint site in Unwind/windows-unaligned-x8…
weliveindetail Nov 7, 2024
95a0bee
[lldb] Fix command-expr-diagnostics.test for Windows (#112109)
omjavaid Oct 16, 2024
85fb0df
Revert "[lldb] Fix command-expr-diagnostics.test for Windows (#112109)"
omjavaid Oct 16, 2024
af014c9
[lldb][test] Fix remote Shell tests failures on Windows host (#115716)
dzhidzhoev Nov 12, 2024
10fef7f
[LLDB] Remove decorator from XPASSes x86/Windows (#100628)
dzhidzhoev Jul 26, 2024
0da07d6
[lldb][CMake] If make isn't found, print a warning but don't error ou…
weliveindetail Oct 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions lldb/bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,24 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar
COMMENT "Copying Python DLL to LLDB binaries directory.")
endif()

# Since Python3.8 the Windows runtime loads dependent DLLs only from the directory of the binary
# itself (and not Path). Windows has no RPATHs, so we must copy all DLLs that we depend on into
# the Python package.
if (WIN32)
# TARGET_RUNTIME_DLLS is supported in CMake 3.21+
if ("${CMAKE_VERSION}" VERSION_LESS "3.21.0")
if (LLDB_INCLUDE_TESTS)
message(SEND_ERROR
"Your CMake version is ${CMAKE_VERSION}. In order to run LLDB tests "
"on Windows please upgrade to 3.21.0 at least (or disable tests with "
"LLDB_INCLUDE_TESTS=Off)")
endif()
else()
add_custom_command(TARGET ${swig_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy -t ${lldb_python_target_dir} $<TARGET_RUNTIME_DLLS:liblldb>
COMMAND_EXPAND_LISTS)
endif()
endif()
Comment on lines +201 to +218

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this can't go upstream? Or is this a cherrypick?

Copy link
Member Author

@weliveindetail weliveindetail Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In upstream LLVM liblldb has no dependent DLLs (except Python itself) so there was no case for it. And yes, it's a cherry-pick from #9370


endfunction()

Expand Down
4 changes: 0 additions & 4 deletions lldb/packages/Python/lldbsuite/test/dotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,6 @@ def parseOptionsAndInitTestdirs():

if args.make:
configuration.make_path = args.make
elif platform_system == "FreeBSD" or platform_system == "NetBSD":
configuration.make_path = "gmake"
else:
configuration.make_path = "make"

if args.dsymutil:
configuration.dsymutil = args.dsymutil
Expand Down
15 changes: 15 additions & 0 deletions lldb/test/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,20 @@ set(LLDB_DEFAULT_TEST_EXECUTABLE "${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb${CMAKE_EXEC

set(LLDB_DEFAULT_TEST_DSYMUTIL "${LLVM_TOOLS_BINARY_DIR}/dsymutil${CMAKE_EXECUTABLE_SUFFIX}")

if(LLDB_TEST_MAKE)
set(LLDB_DEFAULT_TEST_MAKE ${LLDB_TEST_MAKE})
else()
find_program(LLDB_DEFAULT_TEST_MAKE make gmake)
if(LLDB_DEFAULT_TEST_MAKE)
message(STATUS "Found make: ${LLDB_DEFAULT_TEST_MAKE}")
else()
message(STATUS "Not found: make")
message(WARNING
"Many LLDB API tests require 'make' tool. Please provide it in Path "
"or pass via LLDB_TEST_MAKE.")
endif()
endif()

if (TARGET clang)
set(LLDB_DEFAULT_TEST_COMPILER "${LLVM_TOOLS_BINARY_DIR}/clang${CMAKE_EXECUTABLE_SUFFIX}")
else()
Expand All @@ -74,6 +88,7 @@ endif()
set(LLDB_TEST_EXECUTABLE "${LLDB_DEFAULT_TEST_EXECUTABLE}" CACHE PATH "lldb executable used for testing")
set(LLDB_TEST_COMPILER "${LLDB_DEFAULT_TEST_COMPILER}" CACHE PATH "C Compiler to use for building LLDB test inferiors")
set(LLDB_TEST_DSYMUTIL "${LLDB_DEFAULT_TEST_DSYMUTIL}" CACHE PATH "dsymutil used for generating dSYM bundles")
set(LLDB_TEST_MAKE "${LLDB_DEFAULT_TEST_MAKE}" CACHE PATH "make tool used for building test executables")

if ("${LLDB_TEST_COMPILER}" STREQUAL "")
message(FATAL_ERROR "LLDB test compiler not specified. Tests will not run.")
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/commands/expression/top-level/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ all: dummy
include Makefile.rules

dummy: dummy.cpp
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
CXX_SOURCES=dummy.cpp EXE=dummy

4 changes: 2 additions & 2 deletions lldb/test/API/commands/expression/weak_symbols/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ a.out: libdylib.dylib
include Makefile.rules

libdylib.dylib: dylib.c
$(MAKE) -C $(BUILDDIR) -f $(MAKEFILE_RULES) \
"$(MAKE)" -C $(BUILDDIR) -f $(MAKEFILE_RULES) \
C_SOURCES= DYLIB_C_SOURCES=dylib.c DYLIB_NAME=dylib \
CFLAGS_EXTRAS=-DHAS_THEM LD_EXTRAS=-dynamiclib

hidden/libdylib.dylib:
mkdir hidden
$(MAKE) -C $(BUILDDIR)/hidden -f $(MAKEFILE_RULES) \
"$(MAKE)" -C $(BUILDDIR)/hidden -f $(MAKEFILE_RULES) \
C_SOURCES= DYLIB_C_SOURCES=dylib.c DYLIB_NAME=dylib \
LD_EXTRAS=-dynamiclib
2 changes: 1 addition & 1 deletion lldb/test/API/commands/target/create-deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ a.out: libload_a
include Makefile.rules

libload_a:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_NAME=load_a DYLIB_CXX_SOURCES=a.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CXX_SOURCES := main.cpp
USE_LIBDL := 1

lib_b:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=lib_b
all: lib_b

Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/completion/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ USE_LIBDL := 1
a.out: lib_shared

lib_shared:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=shared.cpp DYLIB_NAME=shared

include Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ C_SOURCES := main.c
USE_LIBDL := 1

other:
$(MAKE) -f $(MAKEFILE_RULES) C_SOURCES=other.c EXE=other
"$(MAKE)" -f $(MAKEFILE_RULES) C_SOURCES=other.c EXE=other
all: other

include Makefile.rules
2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/exec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ all: secondprog
include Makefile.rules

secondprog: secondprog.cpp
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
CXX_SOURCES=secondprog.cpp EXE=secondprog
2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/jitloader_gdb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ all: a.out simple
include Makefile.rules

simple:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
C_SOURCES=simple.c EXE=simple
4 changes: 2 additions & 2 deletions lldb/test/API/functionalities/limit-debug-info/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ include Makefile.rules
a.out: libone libtwo

libone:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=one.cpp DYLIB_NAME=one \
CFLAGS_EXTRAS="$(ONE_CXXFLAGS)"

libtwo: libone
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=two.cpp DYLIB_NAME=two \
CFLAGS_EXTRAS="$(TWO_CXXFLAGS)" LD_EXTRAS="-L. -lone"
2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/load_after_attach/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CXX_SOURCES := main.cpp
USE_LIBDL := 1

lib_b:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=lib_b
all: lib_b

Expand Down
6 changes: 3 additions & 3 deletions lldb/test/API/functionalities/load_lazy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ else
endif

t1: t2_0
$(MAKE) VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \
"$(MAKE)" VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_C_SOURCES=t1.c DYLIB_NAME=t1 LD_EXTRAS="-L. $(LINKFLAGS)"

t2_0:
$(MAKE) VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \
"$(MAKE)" VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_C_SOURCES=t2_0.c DYLIB_NAME=t2_0

t2_1:
$(MAKE) VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \
"$(MAKE)" VPATH=$(SRCDIR) -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_C_SOURCES=t2_1.c DYLIB_NAME=t2_1
10 changes: 5 additions & 5 deletions lldb/test/API/functionalities/load_unload/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ a.out: lib_b lib_a lib_c lib_d hidden_lib_d
include Makefile.rules

lib_a: lib_b
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=loadunload_a \
LD_EXTRAS="-L. -lloadunload_b"

lib_b:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=loadunload_b

lib_c:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=c.cpp DYLIB_NAME=loadunload_c

lib_d:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload_d
ifeq ($(OS),Darwin)
install_name_tool -id @executable_path/libloadunload_d.dylib libloadunload_d.dylib
endif

hidden_lib_d: hidden
$(MAKE) VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \
"$(MAKE)" VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload_d
2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/load_using_paths/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ all: hidden_lib a.out
include Makefile.rules

hidden_lib:
$(MAKE) VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \
"$(MAKE)" VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload

2 changes: 1 addition & 1 deletion lldb/test/API/functionalities/scripted_process/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CXXFLAGS_EXTRAS := -target $(TRIPLE)
all: libbaz.dylib a.out

libbaz.dylib: baz.cpp
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_NAME=baz DYLIB_CXX_SOURCES=baz.cpp

include Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ a.out: lib_a lib_b
include Makefile.rules

lib_a:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=load_a

lib_b:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=load_b


Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ a.out: lib_One lib_Two
lib_One: lib_Two

lib_%:
$(MAKE) VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk DSYMUTIL=$(DSYMUTIL)
"$(MAKE)" VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk DSYMUTIL=$(DSYMUTIL)
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
CXX_SOURCES := main.cpp
LD_EXTRAS := -L. -l_d -l_c -l_a -l_b
LD_EXTRAS := -L. -l_d -l_c -l_a -l_b

a.out: lib_b lib_a lib_c lib_d

include Makefile.rules

lib_a: lib_b
$(MAKE) -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=_a \
LD_EXTRAS="-L. -l_b"
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=_a \
LD_EXTRAS="-L. -l_b"

lib_b:
$(MAKE) -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=_b
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=_b

lib_c:
$(MAKE) -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=c.cpp DYLIB_NAME=_c
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=c.cpp DYLIB_NAME=_c

lib_d:
$(MAKE) -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=_d
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=_d
2 changes: 1 addition & 1 deletion lldb/test/API/lang/c/conflicting-symbol/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ include Makefile.rules
a.out: lib_One lib_Two

lib_%:
$(MAKE) VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk
"$(MAKE)" VPATH=$(SRCDIR)/$* -I $(SRCDIR) -f $(SRCDIR)/$*.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@


class TestCaseClassTemplateNonTypeParameterPack(TestBase):
@expectedFailureAll(
oslist=["windows"], archs=["i[3-6]86", "x86_64"]
) # Fails to read memory from target.
@no_debug_info_test
def test(self):
self.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@


class TestCaseClassTemplateTypeParameterPack(TestBase):
@expectedFailureAll(
oslist=["windows"], archs=["i[3-6]86", "x86_64"]
) # Fails to read memory from target.
@no_debug_info_test
def test(self):
self.build()
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/lang/cpp/incomplete-types/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ main.o: CFLAGS_EXTRAS = -flimit-debug-info

limit: a.o main.o
mkdir -p build_limit
$(MAKE) -C $(BUILDDIR)/build_limit -f $(MAKEFILE_RULES) \
"$(MAKE)" -C $(BUILDDIR)/build_limit -f $(MAKEFILE_RULES) \
EXE=../limit CXX_SOURCES="length.cpp ../a.o ../main.o" \
CFLAGS_EXTRAS=-flimit-debug-info NO_LIMIT_DEBUG_INFO_FLAGS=""

4 changes: 2 additions & 2 deletions lldb/test/API/lang/cpp/namespace_definitions/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ a.out: liba libb
include Makefile.rules

liba:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_NAME=a DYLIB_CXX_SOURCES=a.cpp

libb:
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_NAME=b DYLIB_CXX_SOURCES=b.cpp

4 changes: 2 additions & 2 deletions lldb/test/API/lang/objc/conflicting-definition/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ include Makefile.rules

libTest.dylib: Test/Test.m
mkdir -p Test
$(MAKE) MAKE_DSYM=YES -f $(MAKEFILE_RULES) \
"$(MAKE)" MAKE_DSYM=YES -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_NAME=Test DYLIB_OBJC_SOURCES=Test/Test.m \
LD_EXTRAS="-lobjc -framework Foundation" \
CFLAGS_EXTRAS=-I$(SRCDIR)

libTestExt.dylib: TestExt/TestExt.m
mkdir -p TestExt
$(MAKE) MAKE_DSYM=YES -f $(MAKEFILE_RULES) \
"$(MAKE)" MAKE_DSYM=YES -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES DYLIB_NAME=TestExt DYLIB_OBJC_SOURCES=TestExt/TestExt.m \
LD_EXTRAS="-lobjc -framework Foundation -lTest -L." \
CFLAGS_EXTRAS=-I$(SRCDIR)
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/lang/objc/modules-hash-mismatch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ USE_PRIVATE_MODULE_CACHE = YES
.PHONY: update-module

all: $(EXE)
$(MAKE) -f $(SRCDIR)/Makefile update-module
"$(MAKE)" -f $(SRCDIR)/Makefile update-module

include Makefile.rules

Expand Down
4 changes: 2 additions & 2 deletions lldb/test/API/lang/swift/clashing_abi_name/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ all: libLibrary.dylib a.out
include Makefile.rules

libLibrary.dylib: Library.swift
$(MAKE) MAKE_DSYM=YES CC=$(CC) SWIFTC=$(SWIFTC) \
"$(MAKE)" MAKE_DSYM=YES CC=$(CC) SWIFTC=$(SWIFTC) \
ARCH=$(ARCH) DSYMUTIL=$(DSYMUTIL) \
BASENAME=Library \
SWIFTFLAGS_EXTRAS="-I$(BUILDDIR) -enable-library-evolution -emit-library -emit-module -parse-as-library -module-abi-name a" \
VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/dylib.mk all

clean::
$(MAKE) BASENAME=Library VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/dylib.mk clean
"$(MAKE)" BASENAME=Library VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/dylib.mk clean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LD_EXTRAS = -lLibrary -L$(BUILDDIR)
all: libLibrary.dylib a.out

lib%.dylib: %.swift
$(MAKE) MAKE_DSYM=NO DYLIB_ONLY=YES \
"$(MAKE)" MAKE_DSYM=NO DYLIB_ONLY=YES \
DYLIB_HIDE_SWIFTMODULE=YES \
DYLIB_NAME=$(shell basename $< .swift) \
DYLIB_SWIFT_SOURCES=$(shell basename $<) \
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/API/lang/swift/import_spi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ all: A.swiftmodule $(EXE)
include Makefile.rules

A.swiftmodule: $(SRCDIR)/A.swift B.swiftmodule
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES \
DYLIB_NAME=A \
DYLIB_SWIFT_SOURCES=A.swift \
Expand All @@ -17,7 +17,7 @@ A.swiftmodule: $(SRCDIR)/A.swift B.swiftmodule
LD_EXTRAS="-L$(BUILDDIR) -lB"

B.swiftmodule: $(SRCDIR)/B.swift
$(MAKE) -f $(MAKEFILE_RULES) \
"$(MAKE)" -f $(MAKEFILE_RULES) \
DYLIB_ONLY=YES \
DYLIB_NAME=B \
DYLIB_SWIFT_SOURCES=B.swift \
Expand Down
Loading