mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-11-24 15:19:31 -05:00
Add support for ccache (#455)
This commit is contained in:
parent
21f6ecf483
commit
cf59bf1e4d
2 changed files with 9 additions and 5 deletions
|
@ -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?**
|
||||
|
|
6
build.rs
6
build.rs
|
@ -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") {
|
||||
|
|
Loading…
Reference in a new issue