Skip to content

Commit b0b3228

Browse files
authored
Merge pull request #2765 from apple/integrated-driver-descriptions
[Integrated driver] Adopt new driver APIs for descriptions.
2 parents 204525a + 21c63dc commit b0b3228

File tree

1 file changed

+2
-64
lines changed

1 file changed

+2
-64
lines changed

Sources/Build/ManifestBuilder.swift

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -209,77 +209,15 @@ extension LLBuildManifestBuilder {
209209

210210
for job in jobs {
211211
let tool = try resolver.resolve(.path(job.tool))
212-
let isSwiftFrontend: Bool
213-
switch job.kind {
214-
case .compile, .mergeModule, .emitModule, .generatePCH,
215-
.generatePCM, .interpret, .repl, .printTargetInfo,
216-
.versionRequest, .backend:
217-
isSwiftFrontend = true
218-
219-
case .autolinkExtract, .generateDSYM, .help, .link, .verifyDebugInfo:
220-
isSwiftFrontend = false
221-
}
222-
223212
let commandLine = try job.commandLine.map{ try resolver.resolve($0) }
224213
let arguments = [tool] + commandLine
225214

226215
let jobInputs = job.inputs.map { $0.resolveToNode() }
227216
let jobOutputs = job.outputs.map { $0.resolveToNode() }
228217

229-
// Compute a description for this particular job. The output
230-
// is intended to match that of the built-in Swift compiler
231-
// tool so that the use of the integrated driver is mostly
232-
// an implementation detail.
233218
let moduleName = target.target.c99name
234-
let description: String
235-
switch job.kind {
236-
case .compile:
237-
description = "Compiling \(moduleName) \(job.displayInputs.first?.file.name ?? "")"
238-
239-
case .mergeModule:
240-
description = "Merging module \(moduleName)"
241-
242-
case .link:
243-
description = "Linking \(moduleName)"
244-
245-
case .generateDSYM:
246-
description = "Generating dSYM for module \(moduleName)"
247-
248-
case .autolinkExtract:
249-
description = "Extracting autolink information for module \(moduleName)"
250-
251-
case .emitModule:
252-
description = "Emitting module for \(moduleName)"
253-
254-
case .generatePCH:
255-
description = "Compiling bridging header \(job.displayInputs.first!.file.name)"
256-
257-
case .generatePCM:
258-
description = "Compiling Clang module \(job.displayInputs.first!.file.name)"
259-
260-
case .interpret:
261-
description = "Interpreting \(job.displayInputs.first!.file.name)"
262-
263-
case .repl:
264-
description = "Executing Swift REPL"
265-
266-
case .verifyDebugInfo:
267-
description = "Verifying debug information for module \(moduleName)"
268-
269-
case .printTargetInfo:
270-
description = "Gathering target information for module \(moduleName)"
271-
272-
case .versionRequest:
273-
description = "Getting Swift version information"
274-
275-
case .help:
276-
description = "Swift help"
277-
278-
case .backend:
279-
description = "Embedding bitcode for \(moduleName)"
280-
}
281-
282-
if isSwiftFrontend {
219+
let description = job.description
220+
if job.kind.isSwiftFrontend {
283221
manifest.addSwiftFrontendCmd(
284222
name: jobOutputs.first!.name,
285223
moduleName: moduleName,

0 commit comments

Comments
 (0)