forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
93 lines (81 loc) · 2.03 KB
/
BUILD.bazel
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
load("@rules_pkg//:mappings.bzl", "pkg_attributes", "pkg_filegroup", "pkg_files", "strip_prefix")
load("@rules_pkg//:install.bzl", "pkg_install")
load("//:defs.bzl", "codeql_platform")
load("//misc/bazel:pkg_runfiles.bzl", "pkg_runfiles")
filegroup(
name = "schema",
srcs = ["schema.py"],
visibility = ["//swift:__subpackages__"],
)
filegroup(
name = "schema_includes",
srcs = glob(["*.dbscheme"]),
visibility = ["//swift:__subpackages__"],
)
pkg_files(
name = "dbscheme_files",
srcs = [
"ql/lib/swift.dbscheme.stats",
"//swift/extractor/trap:generated_dbscheme",
],
)
pkg_files(
name = "manifest",
srcs = ["codeql-extractor.yml"],
)
pkg_filegroup(
name = "extractor-pack-generic",
srcs = [
":dbscheme_files",
":manifest",
"//swift/tools",
],
visibility = ["//visibility:public"],
)
pkg_runfiles(
name = "extractor",
srcs = ["//swift/extractor"],
prefix = "tools/" + codeql_platform,
)
pkg_runfiles(
name = "xcode-autobuilder",
srcs = ["//swift/xcode-autobuilder"],
prefix = "tools/" + codeql_platform,
)
pkg_files(
name = "swift-test-sdk-arch",
srcs = ["//swift/third_party/swift-llvm-support:swift-test-sdk"],
prefix = "qltest/" + codeql_platform,
strip_prefix = strip_prefix.from_pkg(),
)
pkg_filegroup(
name = "extractor-pack-arch",
srcs = [
":extractor",
":swift-test-sdk-arch",
] + select({
"@platforms//os:linux": [],
"@platforms//os:macos": [
":xcode-autobuilder",
],
}),
visibility = ["//visibility:public"],
)
pkg_filegroup(
name = "extractor-pack",
srcs = [
":extractor-pack-arch",
":extractor-pack-generic",
],
visibility = ["//visibility:public"],
)
pkg_install(
name = "_create_extractor_pack",
srcs = ["//swift:extractor-pack"],
)
py_binary(
name = "create-extractor-pack",
srcs = ["create_extractor_pack.py"],
main = "create_extractor_pack.py",
deps = [":_create_extractor_pack"],
)