Skip to content

Commit f517ff5

Browse files
authored
Remove unnecessary TSCLibc dependency (#4073)
Remove the `TSCLibc` dependency as we do not depend on any of the interfaces from the module. This matters particularly on Windows where static linking Swift content is not available, so this will reduce the amount of dirty memory due to the dynamic library link that cannot be removed.
1 parent b6971ac commit f517ff5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Sources/Commands/SwiftTool.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@ import PackageModel
1919
import SourceControl
2020
import SPMBuildCore
2121
import TSCBasic
22-
import TSCLibc
22+
2323
import TSCUtility
2424
import Workspace
2525
import XCBuildSupport
2626

2727
#if os(Windows)
2828
import WinSDK
29+
#elseif os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
30+
import Darwin
31+
#else
32+
import Glibc
2933
#endif
3034

3135
typealias Diagnostic = Basics.Diagnostic

Tests/FunctionalTests/MiscellaneousTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import PackageModel
1212
import SourceControl
1313
import SPMTestSupport
1414
import TSCBasic
15-
import TSCLibc
15+
1616
import TSCUtility
1717
import Workspace
1818
import XCTest

0 commit comments

Comments
 (0)