2
2
3
3
/*
4
4
This source file is part of the Swift.org open source project
5
-
5
+
6
6
Copyright (c) 2019 - 2021 Apple Inc. and the Swift project authors
7
7
Licensed under Apache License v2.0 with Runtime Library Exception
8
-
8
+
9
9
See http://swift.org/LICENSE.txt for license information
10
10
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
11
11
*/
@@ -21,7 +21,7 @@ if let deploymentTarget = ProcessInfo.processInfo.environment["SWIFTTSC_MACOS_DE
21
21
macOSPlatform = . macOS( . v10_10)
22
22
}
23
23
24
- let CMakeFiles = [ " cmake_install.cmake " , " CMakeLists.txt " , " CMakeFiles " ]
24
+ let CMakeFiles = [ " CMakeLists.txt " ]
25
25
26
26
let package = Package (
27
27
name: " swift-tools-support-core " ,
@@ -46,9 +46,9 @@ let package = Package(
46
46
] ,
47
47
dependencies: [ ] ,
48
48
targets: [
49
-
49
+
50
50
// MARK: Tools support core targets
51
-
51
+
52
52
. target(
53
53
/** Shim target to import missing C headers in Darwin and Glibc modulemap. */
54
54
name: " TSCclibc " ,
@@ -62,24 +62,28 @@ let package = Package(
62
62
. target(
63
63
/** TSCBasic support library */
64
64
name: " TSCBasic " ,
65
- dependencies: [ " TSCLibc " , " TSCclibc " ] ,
65
+ dependencies: [
66
+ " TSCLibc " ,
67
+ " TSCclibc " ,
68
+ . product( name: " SystemPackage " , package : " swift-system " ) ,
69
+ ] ,
66
70
exclude: CMakeFiles + [ " README.md " ] ) ,
67
71
. target(
68
72
/** Abstractions for common operations, should migrate to TSCBasic */
69
73
name: " TSCUtility " ,
70
74
dependencies: [ " TSCBasic " , " TSCclibc " ] ,
71
75
exclude: CMakeFiles) ,
72
-
76
+
73
77
// MARK: Additional Test Dependencies
74
-
78
+
75
79
. target(
76
80
/** Generic test support library */
77
81
name: " TSCTestSupport " ,
78
82
dependencies: [ " TSCBasic " , " TSCUtility " ] ) ,
79
-
80
-
83
+
84
+
81
85
// MARK: Tools support core tests
82
-
86
+
83
87
. testTarget(
84
88
name: " TSCBasicTests " ,
85
89
dependencies: [ " TSCTestSupport " , " TSCclibc " ] ,
@@ -97,6 +101,19 @@ let package = Package(
97
101
]
98
102
)
99
103
104
+ /// When not using local dependencies, the branch to use for llbuild and TSC repositories.
105
+ let relatedDependenciesBranch = " main "
106
+
107
+ if ProcessInfo . processInfo. environment [ " SWIFTCI_USE_LOCAL_DEPS " ] == nil {
108
+ package . dependencies += [
109
+ . package ( url: " https://github.com/apple/swift-system.git " , . upToNextMinor( from: " 1.1.1 " ) ) ,
110
+ ]
111
+ } else {
112
+ package . dependencies += [
113
+ . package ( path: " ../swift-system " ) ,
114
+ ]
115
+ }
116
+
100
117
// FIXME: conditionalise these flags since SwiftPM 5.3 and earlier will crash
101
118
// for platforms they don't know about.
102
119
#if os(Windows)
0 commit comments