@@ -106,11 +106,13 @@ let shoudUseSwiftBuildFramework = (ProcessInfo.processInfo.environment["SWIFTPM_
106
106
let swiftDriverDeps : [ Target . Dependency ]
107
107
let swiftTSCBasicsDeps : [ Target . Dependency ]
108
108
let swiftToolsCoreSupportAutoDeps : [ Target . Dependency ]
109
+ let swiftTSCTestSupportDeps : [ Target . Dependency ]
109
110
110
111
if shoudUseSwiftBuildFramework {
111
112
swiftDriverDeps = [ ]
112
113
swiftTSCBasicsDeps = [ ]
113
114
swiftToolsCoreSupportAutoDeps = [ ]
115
+ swiftTSCTestSupportDeps = [ ]
114
116
} else {
115
117
swiftDriverDeps = [
116
118
. product( name: " SwiftDriver " , package : " swift-driver " )
@@ -121,6 +123,9 @@ if shoudUseSwiftBuildFramework {
121
123
swiftToolsCoreSupportAutoDeps = [
122
124
. product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " )
123
125
]
126
+ swiftTSCTestSupportDeps = [
127
+ . product( name: " TSCTestSupport " , package : " swift-tools-support-core " ) ,
128
+ ]
124
129
}
125
130
let package = Package (
126
131
name: " SwiftPM " ,
@@ -344,8 +349,7 @@ let package = Package(
344
349
name: " BinarySymbols " ,
345
350
dependencies: [
346
351
" Basics " ,
347
- . product( name: " TSCBasic " , package : " swift-tools-support-core " ) ,
348
- ] ,
352
+ ] + swiftTSCBasicsDeps,
349
353
exclude: [ " CMakeLists.txt " ] ,
350
354
swiftSettings: commonExperimentalFeatures + [
351
355
. unsafeFlags( [ " -static " ] ) ,
@@ -819,10 +823,9 @@ let package = Package(
819
823
" PackageRegistry " ,
820
824
" PackageSigning " ,
821
825
" SourceControl " ,
822
- . product( name: " TSCTestSupport " , package : " swift-tools-support-core " ) ,
823
826
. product( name: " OrderedCollections " , package : " swift-collections " ) ,
824
827
" Workspace " ,
825
- ] ,
828
+ ] + swiftTSCTestSupportDeps ,
826
829
swiftSettings: [
827
830
. unsafeFlags( [ " -static " ] ) ,
828
831
]
@@ -1096,12 +1099,10 @@ if ProcessInfo.processInfo.environment["SWIFTPM_LLBUILD_FWK"] == nil {
1096
1099
1097
1100
if ProcessInfo . processInfo. environment [ " SWIFTCI_USE_LOCAL_DEPS " ] == nil {
1098
1101
package . dependencies += [
1099
- . package ( url: " https://github.com/swiftlang/swift-tools-support-core.git " , branch: relatedDependenciesBranch) ,
1100
1102
// The 'swift-argument-parser' version declared here must match that
1101
1103
// used by 'swift-driver' and 'sourcekit-lsp'. Please coordinate
1102
1104
// dependency version changes here with those projects.
1103
1105
. package ( url: " https://github.com/apple/swift-argument-parser.git " , . upToNextMinor( from: " 1.5.1 " ) ) ,
1104
- . package ( url: " https://github.com/swiftlang/swift-driver.git " , branch: relatedDependenciesBranch) ,
1105
1106
. package ( url: " https://github.com/apple/swift-crypto.git " , . upToNextMinor( from: " 3.0.0 " ) ) ,
1106
1107
. package ( url: " https://github.com/swiftlang/swift-syntax.git " , branch: relatedDependenciesBranch) ,
1107
1108
. package ( url: " https://github.com/apple/swift-system.git " , from: " 1.1.1 " ) ,
@@ -1111,18 +1112,29 @@ if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
1111
1112
// For use in previewing documentation
1112
1113
. package ( url: " https://github.com/swiftlang/swift-docc-plugin " , from: " 1.1.0 " ) ,
1113
1114
]
1115
+ if !swiftDriverDeps. isEmpty {
1116
+ package . dependencies += [
1117
+ . package ( url: " https://github.com/swiftlang/swift-tools-support-core.git " , branch: relatedDependenciesBranch) ,
1118
+ . package ( url: " https://github.com/swiftlang/swift-driver.git " , branch: relatedDependenciesBranch) ,
1119
+ ]
1120
+ }
1114
1121
} else {
1115
1122
package . dependencies += [
1116
- . package ( path: " ../swift-tools-support-core " ) ,
1117
1123
. package ( path: " ../swift-argument-parser " ) ,
1118
- . package ( path: " ../swift-driver " ) ,
1119
1124
. package ( path: " ../swift-crypto " ) ,
1120
1125
. package ( path: " ../swift-syntax " ) ,
1121
1126
. package ( path: " ../swift-system " ) ,
1122
1127
. package ( path: " ../swift-collections " ) ,
1123
1128
. package ( path: " ../swift-certificates " ) ,
1124
1129
. package ( path: " ../swift-toolchain-sqlite " ) ,
1125
1130
]
1131
+ if !swiftDriverDeps. isEmpty {
1132
+ package . dependencies += [
1133
+ . package ( path: " ../swift-tools-support-core " ) ,
1134
+ . package ( path: " ../swift-driver " ) ,
1135
+ ]
1136
+ }
1137
+
1126
1138
}
1127
1139
1128
1140
/// If ENABLE_APPLE_PRODUCT_TYPES is set in the environment, then also define ENABLE_APPLE_PRODUCT_TYPES in each of the regular targets and test targets.
0 commit comments