summaryrefslogtreecommitdiff
path: root/build_extra/rust/rust.gni
diff options
context:
space:
mode:
Diffstat (limited to 'build_extra/rust/rust.gni')
-rw-r--r--build_extra/rust/rust.gni7
1 files changed, 7 insertions, 0 deletions
diff --git a/build_extra/rust/rust.gni b/build_extra/rust/rust.gni
index 7f67d2068..2af3b2b12 100644
--- a/build_extra/rust/rust.gni
+++ b/build_extra/rust/rust.gni
@@ -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
}