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:
parent
7bf8f01974
commit
05b41b8b84
2 changed files with 13 additions and 0 deletions
10
README.md
10
README.md
|
@ -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
|
||||
|
|
3
build.rs
3
build.rs
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue