diff options
author | Bert Belder <bertbelder@gmail.com> | 2019-08-22 13:23:49 -0700 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2019-08-22 14:13:01 -0700 |
commit | 7a902fed04e23c2be6133024f7ad8fdebb641c60 (patch) | |
tree | 63ca961caec49049024cddb25cf89184d1db892b /build_extra/rust/rust.gni | |
parent | e0c1ed96e22dc9a94cb5457c8b3eb2f2cd1af831 (diff) |
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.
Diffstat (limited to 'build_extra/rust/rust.gni')
-rw-r--r-- | build_extra/rust/rust.gni | 7 |
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 } |