summaryrefslogtreecommitdiff
path: root/build_extra/rust/rust.gni
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2018-07-22 00:00:09 +0900
committerRyan Dahl <ry@tinyclouds.org>2018-07-21 11:00:09 -0400
commit3563638693fa2736fd86f4cae711a276b548050b (patch)
tree05b8a0dff024b6862a8d4d44cff0584d286902d8 /build_extra/rust/rust.gni
parent89c7554d4a9f9b4c83a91b43575db9aa5d3964a4 (diff)
Fix some warnings (#379)
Diffstat (limited to 'build_extra/rust/rust.gni')
-rw-r--r--build_extra/rust/rust.gni8
1 files changed, 8 insertions, 0 deletions
diff --git a/build_extra/rust/rust.gni b/build_extra/rust/rust.gni
index e99859a59..2fc822837 100644
--- a/build_extra/rust/rust.gni
+++ b/build_extra/rust/rust.gni
@@ -62,11 +62,14 @@ template("run_rustc") {
outputs = []
script = "//tools/run_rustc.py"
+ # TODO: We want to apply "-Dwarnings" only when treat_warnings_as_errors is not false
+ # https://github.com/ry/deno/pull/379
args = [
rebase_path(source_root, root_build_dir),
"--crate-name=$crate_name",
"--crate-type=$crate_type",
]
+
if (!is_win) {
args += [ "--color=always" ]
}
@@ -116,6 +119,10 @@ template("run_rustc") {
}
}
+ if (defined(invoker.args)) {
+ args += invoker.args
+ }
+
if (!defined(deps)) {
deps = []
}
@@ -155,6 +162,7 @@ template("rust_component") {
"source_root",
"is_test",
"testonly",
+ "args",
])
if (!defined(invoker.crate_type)) {
crate_type = "rlib"