forked from swiftlang/swift-llbuild
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPackage.swift
136 lines (122 loc) · 3.87 KB
/
Package.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// swift-tools-version:5.0
// This file defines Swift package manager support for llbuild. See:
// https://github.com/apple/swift-package-manager/tree/master/Documentation
import PackageDescription
let package = Package(
name: "llbuild",
platforms: [
.macOS(.v10_10), .iOS(.v9),
],
products: [
.library(
name: "libllbuild",
targets: ["libllbuild"]),
.library(
name: "llbuildSwift",
targets: ["llbuildSwift"]),
.library(
name: "llbuildSwiftDynamic",
type: .dynamic,
targets: ["llbuildSwift"]),
],
targets: [
/// The llbuild testing tool.
.target(
name: "llbuild",
dependencies: ["llbuildCommands"],
path: "products/llbuild"
),
/// The custom build tool used by the Swift package manager.
.target(
name: "swift-build-tool",
dependencies: ["llbuildBuildSystem"],
path: "products/swift-build-tool"
),
/// The custom build tool used by the Swift package manager.
.target(
name: "llbuildSwift",
dependencies: ["libllbuild"],
path: "products/llbuildSwift",
exclude: []
),
/// The public llbuild API.
.target(
name: "libllbuild",
dependencies: ["llbuildCore", "llbuildBuildSystem"],
path: "products/libllbuild"
),
// MARK: Components
.target(
name: "llbuildBasic",
dependencies: ["llvmSupport"],
path: "lib/Basic"
),
.target(
name: "llbuildCore",
dependencies: ["llbuildBasic"],
path: "lib/Core",
linkerSettings: [.linkedLibrary("sqlite3")]
),
.target(
name: "llbuildBuildSystem",
dependencies: ["llbuildCore"],
path: "lib/BuildSystem"
),
.target(
name: "llbuildNinja",
dependencies: ["llbuildBasic"],
path: "lib/Ninja"
),
.target(
name: "llbuildCommands",
dependencies: ["llbuildCore", "llbuildBuildSystem", "llbuildNinja"],
path: "lib/Commands"
),
// MARK: Test Targets
.target(
name: "llbuildBasicTests",
dependencies: ["llbuildBasic", "gtest"],
path: "unittests/Basic"),
.target(
name: "llbuildCoreTests",
dependencies: ["llbuildCore", "gtest"],
path: "unittests/Core"),
.target(
name: "llbuildBuildSystemTests",
dependencies: ["llbuildBuildSystem", "gtest"],
path: "unittests/BuildSystem"),
.target(
name: "llbuildNinjaTests",
dependencies: ["llbuildNinja", "gtest"],
path: "unittests/Ninja"),
.testTarget(
name: "llbuildSwiftTests",
dependencies: ["llbuildSwift"],
path: "unittests/Swift"),
// MARK: GoogleTest
.target(
name: "gtest",
path: "utils/unittest/googletest/src",
exclude: [
"gtest-death-test.cc",
"gtest-filepath.cc",
"gtest-port.cc",
"gtest-printers.cc",
"gtest-test-part.cc",
"gtest-typed-test.cc",
"gtest.cc",
]),
// MARK: Ingested LLVM code.
.target(
name: "llvmDemangle",
path: "lib/llvm/Demangle"
),
.target(
name: "llvmSupport",
dependencies: ["llvmDemangle"],
path: "lib/llvm/Support",
linkerSettings: [.linkedLibrary("ncurses", .when(platforms: [.linux, .macOS]))]
),
],
cxxLanguageStandard: .cxx14
)