-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathBUILD
49 lines (46 loc) · 1.34 KB
/
BUILD
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
load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library")
cc_library(
name = "CIndexStore",
hdrs = ["Sources/CIndexStore/include/indexstore.h"],
aspect_hints = ["@build_bazel_rules_swift//swift:auto_module"],
copts = ["-std=c++17"],
linkstatic = True,
tags = ["swift_module=CIndexStore"],
)
swift_library(
name = "IndexStore",
srcs = glob(["Sources/IndexStore/*.swift"]),
linkopts = select({
"@platforms//os:linux": ["-lIndexStore"],
"//conditions:default": [],
}),
visibility = [
"//visibility:public",
],
deps = [
":CIndexStore",
] + select({
"@platforms//os:linux": [],
"//conditions:default": [
"@StaticIndexStore//:libIndexStore",
],
}),
)
swift_library(
name = "SwiftDemangle",
srcs = glob(["Sources/SwiftDemangle/*.swift"]),
linkopts = select({
"@platforms//os:linux": [],
"//conditions:default": [
"-Wl,-force_load,__BAZEL_XCODE_DEVELOPER_DIR__/Toolchains/XcodeDefault.xctoolchain/usr/lib/libswiftDemangle.dylib",
"-Wl,-rpath,__BAZEL_XCODE_DEVELOPER_DIR__/Toolchains/XcodeDefault.xctoolchain/usr/lib",
],
}),
module_name = "SwiftDemangle",
visibility = [
"//visibility:public",
],
deps = [
"//Sources/CSwiftDemangle",
],
)