@@ -21,8 +21,10 @@ import SPMBuildCore
21
21
22
22
#if USE_IMPL_ONLY_IMPORTS
23
23
@_implementationOnly import SwiftDriver
24
+ @_implementationOnly import DriverSupport
24
25
#else
25
26
import SwiftDriver
27
+ import DriverSupport
26
28
#endif
27
29
28
30
import enum TSCBasic. ProcessEnv
@@ -229,6 +231,9 @@ public class BuildPlan: SPMBuildCore.BuildPlan {
229
231
/// Cache for tools information.
230
232
var externalExecutablesCache = [ BinaryTarget: [ ExecutableInfo] ] ( )
231
233
234
+ /// driver support utility
235
+ let driverSupport : DriverSupport
236
+
232
237
/// The filesystem to operate on.
233
238
let fileSystem : FileSystem
234
239
@@ -239,16 +244,18 @@ public class BuildPlan: SPMBuildCore.BuildPlan {
239
244
public init (
240
245
buildParameters: BuildParameters ,
241
246
graph: PackageGraph ,
242
- additionalFileRules: [ FileRuleDescription ] = [ ] ,
243
- buildToolPluginInvocationResults: [ ResolvedTarget : [ BuildToolPluginInvocationResult ] ] = [ : ] ,
244
- prebuildCommandResults: [ ResolvedTarget : [ PrebuildCommandResult ] ] = [ : ] ,
247
+ additionalFileRules: [ FileRuleDescription ] ,
248
+ buildToolPluginInvocationResults: [ ResolvedTarget : [ BuildToolPluginInvocationResult ] ] ,
249
+ prebuildCommandResults: [ ResolvedTarget : [ PrebuildCommandResult ] ] ,
250
+ driverSupport: DriverSupport ,
245
251
fileSystem: FileSystem ,
246
252
observabilityScope: ObservabilityScope
247
253
) throws {
248
254
self . buildParameters = buildParameters
249
255
self . graph = graph
250
256
self . buildToolPluginInvocationResults = buildToolPluginInvocationResults
251
257
self . prebuildCommandResults = prebuildCommandResults
258
+ self . driverSupport = driverSupport
252
259
self . fileSystem = fileSystem
253
260
self . observabilityScope = observabilityScope. makeChildScope ( description: " Build Plan " )
254
261
@@ -331,6 +338,7 @@ public class BuildPlan: SPMBuildCore.BuildPlan {
331
338
prebuildCommandResults: prebuildCommandResults [ target] ?? [ ] ,
332
339
requiredMacroProducts: requiredMacroProducts,
333
340
shouldGenerateTestObservation: generateTestObservation,
341
+ driverSupport: driverSupport,
334
342
fileSystem: fileSystem,
335
343
observabilityScope: observabilityScope)
336
344
)
@@ -374,7 +382,13 @@ public class BuildPlan: SPMBuildCore.BuildPlan {
374
382
375
383
// Plan the derived test targets, if necessary.
376
384
if buildParameters. testingParameters. testProductStyle. requiresAdditionalDerivedTestTargets {
377
- let derivedTestTargets = try Self . makeDerivedTestTargets ( buildParameters, graph, self . fileSystem, self . observabilityScope)
385
+ let derivedTestTargets = try Self . makeDerivedTestTargets (
386
+ buildParameters,
387
+ graph,
388
+ self . driverSupport,
389
+ self . fileSystem,
390
+ self . observabilityScope
391
+ )
378
392
for item in derivedTestTargets {
379
393
var derivedTestTargets = [ item. entryPointTargetBuildDescription. target]
380
394
0 commit comments