Files
codeql/rust/codegen/BUILD.bazel
Paolo Tranquilli 7d312feffe Rust: add local copy of rust.ungrammar
This copy is injected by the existing `//rust/ast-generator:inject-sources`
target, and is useful for development.
2025-03-21 09:48:29 +01:00

35 lines
789 B
Python

load("@bazel_skylib//rules:native_binary.bzl", "native_binary")
load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
_args = [
"//rust/ast-generator",
"//rust/ast-generator:rust.ungram",
"//rust/ast-generator:Cargo.toml",
"//misc/codegen",
"//rust:codegen-conf",
]
sh_binary(
name = "codegen",
srcs = ["codegen.sh"],
args = ["$(rlocationpath %s)" % a for a in _args],
data = _args,
visibility = ["//rust:__subpackages__"],
deps = [
"//misc/bazel:sh_runfiles",
],
)
native_binary(
name = "py",
src = "//misc/codegen",
out = "codegen",
args = [
"--configuration-file=$(location //rust:codegen-conf)",
],
data = [
"//rust:codegen-conf",
],
visibility = ["//rust:__subpackages__"],
)