@@ -77,36 +77,3 @@ extension ResolvedProduct: CustomStringConvertible {
77
77
return " <ResolvedProduct: \( name) > "
78
78
}
79
79
}
80
-
81
- fileprivate extension SwiftTarget {
82
- /// Create an executable Swift target from linux main test manifest file.
83
- convenience init ( linuxMain: AbsolutePath , name: String , dependencies: [ Target . Dependency ] ) {
84
- // Look for the first swift test target and use the same swift version
85
- // for linux main target. This will need to change if we move to a model
86
- // where we allow per target swift language version build settings.
87
- let swiftTestTarget = dependencies. first {
88
- guard case . target( let target as SwiftTarget , _) = $0 else { return false }
89
- return target. type == . test
90
- } . flatMap { $0. target as? SwiftTarget }
91
-
92
- // FIXME: This is not very correct but doesn't matter much in practice.
93
- // We need to select the latest Swift language version that can
94
- // satisfy the current tools version but there is not a good way to
95
- // do that currently.
96
- let sources = Sources ( paths: [ linuxMain] , root: linuxMain. parentDirectory)
97
-
98
- let platforms : [ SupportedPlatform ] = swiftTestTarget? . platforms ?? [ ]
99
-
100
- let swiftVersion = swiftTestTarget? . swiftVersion ?? SwiftLanguageVersion ( string: String ( ToolsVersion . currentToolsVersion. major) ) ?? . v4
101
-
102
- self . init (
103
- name: name,
104
- defaultLocalization: nil ,
105
- platforms: platforms,
106
- sources: sources,
107
- dependencies: dependencies,
108
- swiftVersion: swiftVersion,
109
- buildSettings: . init( )
110
- )
111
- }
112
- }
0 commit comments