1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

build: add support for rustc_wrapper

Fixes #690.
This commit is contained in:
Bert Belder 2018-09-25 18:45:09 -07:00
parent f10012facf
commit 47e8242b29
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461

View file

@ -2,6 +2,10 @@ declare_args() {
# Absolute path of rust build files.
rust_build = "//build_extra/rust/"
# Wrapper executable for rustc invocations. This can be used for a caching
# utility, e.g. sccache.
rustc_wrapper = ""
# treat the warnings in rust files as errors
rust_treat_warnings_as_errors = true
}
@ -114,7 +118,13 @@ template("run_rustc") {
]
depfile = "$out_dir/$crate_name$crate_suffix.d"
args = [
if (rustc_wrapper != "") {
args = [ rustc_wrapper ]
} else {
args = []
}
args += [
"rustc",
rebase_path(source_root, root_build_dir),
"--crate-name=$crate_name",