1
- // swift-tools-version:5.1
2
- // In order to support users running on the latest Xcodes, please ensure that
3
- //
[email protected] is kept in sync with this file.
1
+ // swift-tools-version:5.5
2
+
4
3
import PackageDescription
5
4
import class Foundation. ProcessInfo
6
5
@@ -44,31 +43,42 @@ let package = Package(
44
43
targets: [
45
44
46
45
/// C modules wrapper for _InternalLibSwiftScan.
47
- . target( name: " CSwiftScan " ) ,
46
+ . target( name: " CSwiftScan " ,
47
+ exclude: [ " CMakeLists.txt " ] ) ,
48
48
49
49
/// The driver library.
50
50
. target(
51
51
name: " SwiftDriver " ,
52
- dependencies: [ " SwiftOptions " , " SwiftToolsSupport-auto " ,
53
- " CSwiftScan " , " Yams " ] ,
54
- exclude: [ " CMakeLists.txt " , " SwiftDriver.docc " ] ) ,
52
+ dependencies: [
53
+ " SwiftOptions " ,
54
+ . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
55
+ " CSwiftScan " ,
56
+ . product( name: " Yams " , package : " Yams " ) ,
57
+ ] ,
58
+ exclude: [ " CMakeLists.txt " ] ) ,
55
59
56
60
/// The execution library.
57
61
. target(
58
62
name: " SwiftDriverExecution " ,
59
- dependencies: [ " SwiftDriver " , " SwiftToolsSupport-auto " ] ,
63
+ dependencies: [
64
+ " SwiftDriver " ,
65
+ . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " )
66
+ ] ,
60
67
exclude: [ " CMakeLists.txt " ] ) ,
61
68
62
69
/// Driver tests.
63
70
. testTarget(
64
71
name: " SwiftDriverTests " ,
65
- dependencies: [ " SwiftDriver " , " SwiftDriverExecution " , " swift-driver " ,
66
- " TestUtilities " ] ) ,
72
+ dependencies: [ " SwiftDriver " , " SwiftDriverExecution " , " TestUtilities " ] ) ,
67
73
68
74
/// IncrementalImport tests
69
75
. testTarget(
70
76
name: " IncrementalImportTests " ,
71
- dependencies: [ " IncrementalTestFramework " , " TestUtilities " , " SwiftToolsSupport-auto " ] ) ,
77
+ dependencies: [
78
+ " IncrementalTestFramework " ,
79
+ " TestUtilities " ,
80
+ . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
81
+ ] ) ,
72
82
73
83
. target(
74
84
name: " IncrementalTestFramework " ,
@@ -86,32 +96,38 @@ let package = Package(
86
96
/// The options library.
87
97
. target(
88
98
name: " SwiftOptions " ,
89
- dependencies: [ " SwiftToolsSupport-auto " ] ,
99
+ dependencies: [
100
+ . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
101
+ ] ,
90
102
exclude: [ " CMakeLists.txt " ] ) ,
91
103
. testTarget(
92
104
name: " SwiftOptionsTests " ,
93
105
dependencies: [ " SwiftOptions " ] ) ,
94
106
95
107
/// The primary driver executable.
96
- . target (
108
+ . executableTarget (
97
109
name: " swift-driver " ,
98
110
dependencies: [ " SwiftDriverExecution " , " SwiftDriver " ] ,
99
111
exclude: [ " CMakeLists.txt " ] ) ,
100
112
101
113
/// The help executable.
102
- . target (
114
+ . executableTarget (
103
115
name: " swift-help " ,
104
- dependencies: [ " SwiftOptions " , " ArgumentParser " , " SwiftToolsSupport-auto " ] ,
116
+ dependencies: [
117
+ " SwiftOptions " ,
118
+ . product( name: " ArgumentParser " , package : " swift-argument-parser " ) ,
119
+ . product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
120
+ ] ,
105
121
exclude: [ " CMakeLists.txt " ] ) ,
106
122
107
123
/// The help executable.
108
- . target (
124
+ . executableTarget (
109
125
name: " swift-build-sdk-interfaces " ,
110
126
dependencies: [ " SwiftDriver " , " SwiftDriverExecution " ] ,
111
127
exclude: [ " CMakeLists.txt " ] ) ,
112
128
113
129
/// The `makeOptions` utility (for importing option definitions).
114
- . target (
130
+ . executableTarget (
115
131
name: " makeOptions " ,
116
132
dependencies: [ ] ) ,
117
133
] ,
@@ -123,14 +139,19 @@ if ProcessInfo.processInfo.environment["SWIFT_DRIVER_LLBUILD_FWK"] == nil {
123
139
package . dependencies += [
124
140
. package ( url: " https://github.com/apple/swift-llbuild.git " , . branch( " main " ) ) ,
125
141
]
142
+ package . targets. first ( where: { $0. name == " SwiftDriverExecution " } ) !. dependencies += [
143
+ . product( name: " llbuildSwift " , package : " swift-llbuild " ) ,
144
+ ]
126
145
} else {
127
146
// In Swift CI, use a local path to llbuild to interoperate with tools
128
147
// like `update-checkout`, which control the sources externally.
129
148
package . dependencies += [
130
- . package ( path: " ../llbuild " ) ,
149
+ . package ( name: " llbuild " , path: " ../llbuild " ) ,
150
+ ]
151
+ package . targets. first ( where: { $0. name == " SwiftDriverExecution " } ) !. dependencies += [
152
+ . product( name: " llbuildSwift " , package : " llbuild " ) ,
131
153
]
132
154
}
133
- package . targets. first ( where: { $0. name == " SwiftDriverExecution " } ) !. dependencies += [ " llbuildSwift " ]
134
155
}
135
156
136
157
if ProcessInfo . processInfo. environment [ " SWIFTCI_USE_LOCAL_DEPS " ] == nil {
@@ -145,7 +166,7 @@ if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
145
166
} else {
146
167
package . dependencies += [
147
168
. package ( path: " ../swift-tools-support-core " ) ,
148
- . package ( path: " ../yams " ) ,
169
+ . package ( name : " Yams " , path: " ../yams " ) ,
149
170
. package ( path: " ../swift-argument-parser " ) ,
150
171
]
151
172
}
0 commit comments