Skip to content

Commit 986d058

Browse files
committed
[swiftpm] Statically link to libSwiftPM
Switch to using the swiftpm library with automatic linkage, which in practice means we will statically link to libSwiftPM using the standard build. This change allows us to install the sourcekit-lsp binary without also installing a copy of libSwiftPM.dylib (and since swiftpm isn't using a stable ABI we couldn't share that with anything). Previously this was blocked by conflicts between the llvm code in llbuild and in indexstore-db, but this has been resolved.
1 parent 6825e99 commit 986d058

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Package.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ let package = Package(
3737

3838
.target(
3939
name: "SKSwiftPMWorkspace",
40-
dependencies: ["SwiftPM", "SKCore"]),
40+
dependencies: ["SwiftPM-auto", "SKCore"]),
4141
.testTarget(
4242
name: "SKSwiftPMWorkspaceTests",
4343
dependencies: ["SKSwiftPMWorkspace", "SKTestSupport"]),
@@ -76,10 +76,7 @@ let package = Package(
7676
// useful to any Swift package. Similar in spirit to SwiftPM's Basic module.
7777
.target(
7878
name: "SKSupport",
79-
// FIXME: this should be "Utility", not the full SwiftPM library. Right now that creates
80-
// multiple definition warnings at run time because SwiftPM is dynamically linked and
81-
// Utility is static.
82-
dependencies: ["SwiftPM"]),
79+
dependencies: ["SPMUtility"]),
8380
.testTarget(
8481
name: "SKSupportTests",
8582
dependencies: ["SKSupport", "SKTestSupport"]),

0 commit comments

Comments
 (0)