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.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"