mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 04:48:52 -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 = [
|
cflags = [
|
||||||
"-Wno-exit-time-destructors",
|
"-Wno-exit-time-destructors",
|
||||||
"-Wno-header-hygiene",
|
"-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") {
|
rust_component("percent_encoding") {
|
||||||
source_root = "$crates/registry/src/github.com-1ecc6299db9ec823/percent-encoding-1.0.1/lib.rs"
|
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") {
|
rust_component("matches") {
|
||||||
|
|
|
@ -62,11 +62,14 @@ template("run_rustc") {
|
||||||
outputs = []
|
outputs = []
|
||||||
script = "//tools/run_rustc.py"
|
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 = [
|
args = [
|
||||||
rebase_path(source_root, root_build_dir),
|
rebase_path(source_root, root_build_dir),
|
||||||
"--crate-name=$crate_name",
|
"--crate-name=$crate_name",
|
||||||
"--crate-type=$crate_type",
|
"--crate-type=$crate_type",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (!is_win) {
|
if (!is_win) {
|
||||||
args += [ "--color=always" ]
|
args += [ "--color=always" ]
|
||||||
}
|
}
|
||||||
|
@ -116,6 +119,10 @@ template("run_rustc") {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (defined(invoker.args)) {
|
||||||
|
args += invoker.args
|
||||||
|
}
|
||||||
|
|
||||||
if (!defined(deps)) {
|
if (!defined(deps)) {
|
||||||
deps = []
|
deps = []
|
||||||
}
|
}
|
||||||
|
@ -155,6 +162,7 @@ template("rust_component") {
|
||||||
"source_root",
|
"source_root",
|
||||||
"is_test",
|
"is_test",
|
||||||
"testonly",
|
"testonly",
|
||||||
|
"args",
|
||||||
])
|
])
|
||||||
if (!defined(invoker.crate_type)) {
|
if (!defined(invoker.crate_type)) {
|
||||||
crate_type = "rlib"
|
crate_type = "rlib"
|
||||||
|
|
Loading…
Reference in a new issue