@@ -25,7 +25,7 @@ let package = Package(
25
25
/// The driver library.
26
26
. target(
27
27
name: " SwiftDriver " ,
28
- dependencies: [ " SwiftOptions " , " SwiftToolsSupport-auto " , " llbuildSwift " , " Yams " ] ) ,
28
+ dependencies: [ " SwiftOptions " , " SwiftToolsSupport-auto " , " Yams " ] ) ,
29
29
. testTarget(
30
30
name: " SwiftDriverTests " ,
31
31
dependencies: [ " SwiftDriver " , " swift-driver " ] ) ,
@@ -56,16 +56,29 @@ let package = Package(
56
56
cxxLanguageStandard: . cxx14
57
57
)
58
58
59
+ if ProcessInfo . processInfo. environment [ " SWIFT_DRIVER_LLBUILD_FWK " ] == nil {
60
+ if ProcessInfo . processInfo. environment [ " SWIFTCI_USE_LOCAL_DEPS " ] == nil {
61
+ package . dependencies += [
62
+ . package ( url: " https://github.com/apple/swift-llbuild.git " , . branch( " master " ) ) ,
63
+ ]
64
+ } else {
65
+ // In Swift CI, use a local path to llbuild to interoperate with tools
66
+ // like `update-checkout`, which control the sources externally.
67
+ package . dependencies += [
68
+ . package ( path: " ../llbuild " ) ,
69
+ ]
70
+ }
71
+ package . targets. first ( where: { $0. name == " SwiftDriver " } ) !. dependencies += [ " llbuildSwift " ]
72
+ }
73
+
59
74
if ProcessInfo . processInfo. environment [ " SWIFTCI_USE_LOCAL_DEPS " ] == nil {
60
75
package . dependencies += [
61
76
. package ( url: " https://github.com/apple/swift-tools-support-core.git " , . branch( " master " ) ) ,
62
- . package ( url: " https://github.com/apple/swift-llbuild.git " , . branch( " master " ) ) ,
63
77
. package ( url: " https://github.com/jpsim/Yams.git " , . branch( " master " ) ) ,
64
78
]
65
79
} else {
66
80
package . dependencies += [
67
81
. package ( path: " ../swiftpm/swift-tools-support-core " ) ,
68
82
. package ( path: " ../yams " ) ,
69
- . package ( path: " ../llbuild " ) ,
70
83
]
71
84
}
0 commit comments