summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build_extra/flatbuffers/BUILD.gn4
-rw-r--r--build_extra/rust/BUILD.gn7
-rw-r--r--build_extra/rust/rust.gni8
3 files changed, 19 insertions, 0 deletions
diff --git a/build_extra/flatbuffers/BUILD.gn b/build_extra/flatbuffers/BUILD.gn
index b46cb3d2c..d3ace99c5 100644
--- a/build_extra/flatbuffers/BUILD.gn
+++ b/build_extra/flatbuffers/BUILD.gn
@@ -13,6 +13,10 @@ config("flatbuffers_config") {
cflags = [
"-Wno-exit-time-destructors",
"-Wno-header-hygiene",
+
+ # TODO: rust branch of flatbuffers has this warning.
+ # This should be removed when the branch fixed.
+ "-Wno-return-type",
]
}
}
diff --git a/build_extra/rust/BUILD.gn b/build_extra/rust/BUILD.gn
index f5c85319a..b94cfe372 100644
--- a/build_extra/rust/BUILD.gn
+++ b/build_extra/rust/BUILD.gn
@@ -26,6 +26,13 @@ rust_component("url") {
rust_component("percent_encoding") {
source_root = "$crates/registry/src/github.com-1ecc6299db9ec823/percent-encoding-1.0.1/lib.rs"
+ args = [
+ # TODO: Suppress some warnings at this moment
+ # This should be removed when it's fixed in servo/rust-url repository
+ # https://github.com/servo/rust-url/issues/455
+ "-Aunused-imports",
+ "-Adeprecated",
+ ]
}
rust_component("matches") {
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"