Skip to content

Commit c818cdb

Browse files
committed
[Integrated Swift driver] Use the tools from SwiftPM's toolchain.
The Swift driver's toolchain and SwiftPM's toolchain might have slightly different paths in them. For now, map to SwiftPM's toolchain. There should be a more direct way to rectify these.
1 parent e836957 commit c818cdb

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Sources/Build/ManifestBuilder.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,19 @@ extension LLBuildManifestBuilder {
205205
let resolver = try ArgsResolver()
206206

207207
for job in jobs {
208-
let datool = try resolver.resolve(.path(job.tool))
208+
// Figure out which tool we are using.
209+
// FIXME: This feels like a hack.
210+
var datool: String
211+
switch job.kind {
212+
case .compile, .mergeModule, .emitModule, .generatePCH,
213+
.generatePCM, .interpret, .repl, .printTargetInfo,
214+
.versionRequest:
215+
datool = buildParameters.toolchain.swiftCompiler.pathString
216+
217+
case .autolinkExtract, .generateDSYM, .help, .link, .verifyDebugInfo:
218+
datool = try resolver.resolve(.path(job.tool))
219+
}
220+
209221
let commandLine = try job.commandLine.map{ try resolver.resolve($0) }
210222
let arguments = [datool] + commandLine
211223

0 commit comments

Comments
 (0)