Skip to content

Commit 7f91029

Browse files
authored
Fix BuildOperationBuildSystemDelegateHandler (#3249)
This got broken in #3209 which was using `llbuildSwift` unconditionally. This is easy to miss, but in some environments we set `SWIFTPM_LLBUILD_FWK` and link against a pre-built framework which will only have the module `llbuild`. We should improve the testing here and build in both modes to avoid this kind of breakage in the future.
1 parent fcbb67c commit 7f91029

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Sources/Build/BuildOperationBuildSystemDelegateHandler.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ import Foundation
1818
import LLBuildManifest
1919
import SPMBuildCore
2020

21+
#if canImport(llbuildSwift)
22+
typealias LLBuildBuildSystemDelegate = llbuildSwift.BuildSystemDelegate
23+
#else
24+
typealias LLBuildBuildSystemDelegate = llbuild.BuildSystemDelegate
25+
#endif
26+
2127
typealias Diagnostic = TSCBasic.Diagnostic
2228

2329
class CustomLLBuildCommand: SPMLLBuild.ExternalCommand {
@@ -356,7 +362,7 @@ final class CopyCommand: CustomLLBuildCommand {
356362
}
357363

358364
/// Convenient llbuild build system delegate implementation
359-
final class BuildOperationBuildSystemDelegateHandler: llbuildSwift.BuildSystemDelegate, SwiftCompilerOutputParserDelegate {
365+
final class BuildOperationBuildSystemDelegateHandler: LLBuildBuildSystemDelegate, SwiftCompilerOutputParserDelegate {
360366
private let diagnostics: DiagnosticsEngine
361367
var outputStream: ThreadSafeOutputByteStream
362368
var progressAnimation: ProgressAnimationProtocol

0 commit comments

Comments
 (0)