mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
Fix some warnings (#379)
This commit is contained in:
parent
89c7554d4a
commit
3563638693
3 changed files with 19 additions and 0 deletions
|
@ -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",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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") {
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue