1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

build: add 'cap_lints' flag for rust crates

Using a specialized flag rather than the generic 'args' option makes
build_extra/rust/BUILD.gn shorter and more readable.
This commit is contained in:
Bert Belder 2019-08-22 13:23:49 -07:00
parent e0c1ed96e2
commit 7a902fed04
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461
2 changed files with 152 additions and 580 deletions

File diff suppressed because it is too large Load diff

View file

@ -56,6 +56,7 @@ template("_rust_crate") {
forward_variables_from(invoker,
[
"cap_lints",
"cfg",
"crate_name",
"crate_type",
@ -280,6 +281,12 @@ template("_rust_crate") {
if (rust_treat_warnings_as_errors) {
args += [ "-Dwarnings" ]
}
if (defined(cap_lints)) {
args += [
"--cap-lints",
cap_lints,
]
}
if (defined(invoker.args)) {
args += invoker.args
}