codeql/swift/BUILD.bazel

108 строки
2.3 KiB
Python
Исходник Обычный вид История

2022-04-20 13:35:19 +03:00
load("@rules_pkg//:mappings.bzl", "pkg_attributes", "pkg_filegroup", "pkg_files", "strip_prefix")
load("@rules_pkg//:install.bzl", "pkg_install")
2022-04-12 17:03:20 +03:00
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(
2022-10-18 11:04:50 +03:00
name = "scripts",
srcs = ["tools/qltest.sh", "tools/autobuild.sh"],
2022-10-12 09:55:00 +03:00
attributes = pkg_attributes(mode = "0755"),
prefix = "tools",
)
2022-04-28 14:17:35 +03:00
pkg_files(
name = "tracing-config",
srcs = ["tools/tracing-config.lua"],
prefix = "tools",
)
pkg_files(
name = "manifest",
srcs = ["codeql-extractor.yml"],
)
pkg_filegroup(
name = "extractor-pack-generic",
srcs = [
":dbscheme_files",
":manifest",
2022-04-28 14:17:35 +03:00
":tracing-config",
2022-10-18 11:04:50 +03:00
":scripts",
],
visibility = ["//visibility:public"],
)
pkg_runfiles(
name = "extractor",
srcs = ["//swift/extractor"],
prefix = "tools/" + codeql_platform,
)
2022-10-12 09:55:00 +03:00
pkg_runfiles(
name = "xcode-autobuilder",
srcs = ["//swift/xcode-autobuilder"],
prefix = "tools/" + codeql_platform,
)
2022-04-20 13:35:19 +03:00
pkg_files(
name = "swift-test-sdk-arch",
srcs = ["//swift/tools/prebuilt:swift-test-sdk"],
2022-04-20 13:35:19 +03:00
prefix = "qltest/" + codeql_platform,
strip_prefix = strip_prefix.from_pkg(),
)
pkg_filegroup(
name = "extractor-pack-arch",
2022-04-20 13:35:19 +03:00
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(
2022-04-12 17:03:20 +03:00
name = "_create_extractor_pack",
srcs = ["//swift:extractor-pack"],
2022-04-12 17:03:20 +03:00
)
py_binary(
name = "create-extractor-pack",
srcs = ["tools/create_extractor_pack.py"],
main = "tools/create_extractor_pack.py",
deps = [":_create_extractor_pack"],
)