0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-12-25 16:49:29 -05:00

Add support for ccache (#455)

This commit is contained in:
devsnek 2020-09-03 12:22:07 -05:00 committed by GitHub
parent 21f6ecf483
commit cf59bf1e4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View file

@ -71,7 +71,7 @@ providing a `$CLANG_BASE_PATH` environmental variable pointing to a recent
You could also pass in additional arguments to `gn` by setting the `$GN_ARGS`
environmental variable.
Env vars used in when building from source: `SCCACHE`, `GN`, `NINJA`,
Env vars used in when building from source: `SCCACHE`, `CCACHE`, `GN`, `NINJA`,
`CLANG_BASE_PATH`, `GN_ARGS`
## FAQ
@ -79,9 +79,9 @@ Env vars used in when building from source: `SCCACHE`, `GN`, `NINJA`,
**Building V8 takes over 30 minutes, this is too slow for me to use this crate.
What should I do?**
Install [sccache](https://github.com/mozilla/sccache). Our build scripts will
detect and use sccache. Set the `$SCCACHE` environmental variable if it's not in
your path.
Install [sccache](https://github.com/mozilla/sccache) or
[ccache](https://ccache.dev/). Our build scripts will detect and use them. Set
the `$SCCACHE` or `$CCACHE` environmental variable if it's not in your path.
**What are all these random directories for like `build` and `buildtools` are
these really necessary?**

View file

@ -81,8 +81,12 @@ fn build_v8() {
cc_wrapper(&mut gn_args, &Path::new(&p));
} else if let Ok(p) = which("sccache") {
cc_wrapper(&mut gn_args, &p);
} else if let Some(p) = env::var_os("CCACHE") {
cc_wrapper(&mut gn_args, &Path::new(&p));
} else if let Ok(p) = which("ccache") {
cc_wrapper(&mut gn_args, &p);
} else {
println!("cargo:warning=Not using sccache");
println!("cargo:warning=Not using sccache or ccache");
}
if let Ok(args) = env::var("GN_ARGS") {