mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Previously, we were using 8.0.0rc1. In particular, this upgrade means we need to explicitly import more rules, as they've been moved out of the core bazel repo.
39 lines
1.0 KiB
Python
39 lines
1.0 KiB
Python
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
|
|
load("//misc/bazel:pkg.bzl", "codeql_pkg_runfiles")
|
|
load("//swift:rules.bzl", "swift_cc_binary")
|
|
|
|
swift_cc_binary(
|
|
name = "extractor.real",
|
|
srcs = glob([
|
|
"*.h",
|
|
"*.cpp",
|
|
]),
|
|
linkopts = select({
|
|
"@platforms//os:macos": ["-headerpad_max_install_names"],
|
|
"//conditions:default": [],
|
|
}),
|
|
visibility = ["//swift:__pkg__"],
|
|
deps = [
|
|
"//swift/extractor/config",
|
|
"//swift/extractor/infra",
|
|
"//swift/extractor/invocation",
|
|
"//swift/extractor/remapping",
|
|
"//swift/extractor/translators",
|
|
"//swift/third_party/swift-llvm-support",
|
|
"@absl//absl/strings",
|
|
],
|
|
)
|
|
|
|
sh_binary(
|
|
name = "extractor",
|
|
srcs = ["extractor.sh"],
|
|
data = [":extractor.real"],
|
|
)
|
|
|
|
codeql_pkg_runfiles(
|
|
name = "pkg",
|
|
excludes = ["extractor.sh"], # script gets copied as "extractor", no need for the original .sh file
|
|
exes = [":extractor"],
|
|
visibility = ["//swift:__pkg__"],
|
|
)
|