@@ -46,9 +46,6 @@ public final class SwiftTargetBuildDescription {
46
46
/// The build parameters for this target.
47
47
let defaultBuildParameters : BuildParameters
48
48
49
- /// The build parameters for build tools.
50
- let toolsBuildParameters : BuildParameters
51
-
52
49
/// Path to the temporary directory for this target.
53
50
let tempsPath : AbsolutePath
54
51
@@ -235,7 +232,7 @@ public final class SwiftTargetBuildDescription {
235
232
public let prebuildCommandResults : [ PrebuildCommandResult ]
236
233
237
234
/// Any macro products that this target requires to build.
238
- public let requiredMacroProducts : [ ResolvedProduct ]
235
+ public let requiredMacroProducts : [ ProductBuildDescription ]
239
236
240
237
/// ObservabilityScope with which to emit diagnostics
241
238
private let observabilityScope : ObservabilityScope
@@ -253,10 +250,9 @@ public final class SwiftTargetBuildDescription {
253
250
toolsVersion: ToolsVersion ,
254
251
additionalFileRules: [ FileRuleDescription ] = [ ] ,
255
252
destinationBuildParameters: BuildParameters ,
256
- toolsBuildParameters: BuildParameters ,
257
253
buildToolPluginInvocationResults: [ BuildToolPluginInvocationResult ] = [ ] ,
258
254
prebuildCommandResults: [ PrebuildCommandResult ] = [ ] ,
259
- requiredMacroProducts: [ ResolvedProduct ] = [ ] ,
255
+ requiredMacroProducts: [ ProductBuildDescription ] = [ ] ,
260
256
testTargetRole: TestTargetRole ? = nil ,
261
257
shouldGenerateTestObservation: Bool = false ,
262
258
shouldDisableSandbox: Bool ,
@@ -272,7 +268,6 @@ public final class SwiftTargetBuildDescription {
272
268
self . target = target
273
269
self . toolsVersion = toolsVersion
274
270
self . defaultBuildParameters = destinationBuildParameters
275
- self . toolsBuildParameters = toolsBuildParameters
276
271
277
272
// Unless mentioned explicitly, use the target type to determine if this is a test target.
278
273
if let testTargetRole {
@@ -439,15 +434,15 @@ public final class SwiftTargetBuildDescription {
439
434
440
435
#if BUILD_MACROS_AS_DYLIBS
441
436
self . requiredMacroProducts. forEach { macro in
442
- args += [ " -Xfrontend " , " -load-plugin-library " , " -Xfrontend " , self . toolsBuildParameters . binaryPath ( for : macro ) . pathString]
437
+ args += [ " -Xfrontend " , " -load-plugin-library " , " -Xfrontend " , macro . binaryPath. pathString]
443
438
}
444
439
#else
445
440
try self . requiredMacroProducts. forEach { macro in
446
- if let macroTarget = macro. targets. first {
447
- let executablePath = try self . toolsBuildParameters . binaryPath ( for : macro ) . pathString
441
+ if let macroTarget = macro. product . targets. first {
442
+ let executablePath = try macro . binaryPath. pathString
448
443
args += [ " -Xfrontend " , " -load-plugin-executable " , " -Xfrontend " , " \( executablePath) # \( macroTarget. c99name) " ]
449
444
} else {
450
- throw InternalError ( " macro product \( macro. name) has no targets " ) // earlier validation should normally catch this
445
+ throw InternalError ( " macro product \( macro. product . name) has no targets " ) // earlier validation should normally catch this
451
446
}
452
447
}
453
448
#endif
0 commit comments