summaryrefslogtreecommitdiff
path: root/build_extra/rust/rust.gni
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2018-09-16 20:53:19 -0700
committerBert Belder <bertbelder@gmail.com>2018-09-16 20:57:17 -0700
commit836fc255ba96a6d48a668dd4e0540274a70b5eb5 (patch)
treed1c6cf5d1918599600dae6eb49aafc5b228eb736 /build_extra/rust/rust.gni
parentc7a4ca3c88850b6409888038aee7792087f081d8 (diff)
Suppress remaining warnings in third party rust crates
Diffstat (limited to 'build_extra/rust/rust.gni')
-rw-r--r--build_extra/rust/rust.gni8
1 files changed, 7 insertions, 1 deletions
diff --git a/build_extra/rust/rust.gni b/build_extra/rust/rust.gni
index 85959e921..aaf111676 100644
--- a/build_extra/rust/rust.gni
+++ b/build_extra/rust/rust.gni
@@ -57,6 +57,7 @@ template("run_rustc") {
"is_test",
"source_root",
"testonly",
+ "treat_warnings_as_errors",
])
if (!defined(crate_name)) {
crate_name = target_name
@@ -64,6 +65,10 @@ template("run_rustc") {
if (!defined(is_test)) {
is_test = false
}
+ if (!defined(treat_warnings_as_errors)) {
+ # Use global setting if not explicitly specified for this target.
+ treat_warnings_as_errors = rust_treat_warnings_as_errors
+ }
sources = [
source_root,
@@ -76,7 +81,7 @@ template("run_rustc") {
"--crate-type=$crate_type",
]
- if (rust_treat_warnings_as_errors) {
+ if (treat_warnings_as_errors) {
args += [ "-Dwarnings" ]
}
@@ -254,6 +259,7 @@ template("rust_crate") {
"is_test",
"source_root",
"testonly",
+ "treat_warnings_as_errors",
])
}