summaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorandy finch <andyfinch7@gmail.com>2019-03-04 18:09:35 -0500
committerRyan Dahl <ry@tinyclouds.org>2019-03-04 18:09:35 -0500
commit75fe80d5a4992ddad89160c2e0113a1af8d3d24a (patch)
treeb176830727f0e143f8d26066e4056085ad034403 /build.rs
parent77d7ad61f39641b79a60a99da2f939cbc1d8fe39 (diff)
`use-snapshots` build option for cross compile support. (#1852)
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/build.rs b/build.rs
index 72878fd5f..98dd393c3 100644
--- a/build.rs
+++ b/build.rs
@@ -76,6 +76,13 @@ fn main() {
}
}
+ // Enable snapshots for x64 builds
+ if env::var("CARGO_CFG_TARGET_ARCH").unwrap() == "x86_64" {
+ // Not related to v8_use_snapshot
+ // This only enables using pregenerated snapshots for isolate init
+ println!("cargo:rustc-cfg=feature=\"use-snapshot-init\"");
+ }
+
if !gn_out_path.join("build.ninja").exists() {
let status = Command::new("python")
.env("DENO_BUILD_PATH", &gn_out_dir)