0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-11-21 15:04:33 -05:00

Add support for a RUSTY_V8_ARCHIVE environment variable (#812)

This commit is contained in:
Rafael Ávila de Espíndola 2021-10-25 13:35:19 -07:00 committed by GitHub
parent 7bf8f01974
commit 05b41b8b84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -82,6 +82,16 @@ for REL in v0.13.0 v0.12.0; do
done
```
## The `RUSTY_V8_ARCHIVE` environment variable
Tell the build script to use a specific v8 library. This can be an URL
or a path. This is useful when you have a prebuilt archive somewhere:
```bash
export RUSTY_V8_ARCHIVE=/path/to/custom_archive.a
cargo build
```
## Build V8 from Source
Use `V8_FROM_SOURCE=1 cargo build -vv` to build the crate completely from

View file

@ -201,6 +201,9 @@ fn download_ninja_gn_binaries() {
}
fn static_lib_url() -> String {
if let Ok(custom_archive) = env::var("RUSTY_V8_ARCHIVE") {
return custom_archive;
}
let default_base = "https://github.com/denoland/rusty_v8/releases/download";
let base =
env::var("RUSTY_V8_MIRROR").unwrap_or_else(|_| default_base.into());