diff options
author | andy finch <andyfinch7@gmail.com> | 2019-03-04 18:09:35 -0500 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-03-04 18:09:35 -0500 |
commit | 75fe80d5a4992ddad89160c2e0113a1af8d3d24a (patch) | |
tree | b176830727f0e143f8d26066e4056085ad034403 /src/snapshot.rs | |
parent | 77d7ad61f39641b79a60a99da2f939cbc1d8fe39 (diff) |
`use-snapshots` build option for cross compile support. (#1852)
Diffstat (limited to 'src/snapshot.rs')
-rw-r--r-- | src/snapshot.rs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/snapshot.rs b/src/snapshot.rs deleted file mode 100644 index ac1648e0c..000000000 --- a/src/snapshot.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -use crate::libdeno::deno_buf; - -pub fn deno_snapshot() -> deno_buf { - #[cfg(not(feature = "check-only"))] - let data = - include_bytes!(concat!(env!("GN_OUT_DIR"), "/gen/snapshot_deno.bin")); - // The snapshot blob is not available when the Rust Language Server runs - // 'cargo check'. - #[cfg(feature = "check-only")] - let data = vec![]; - - unsafe { deno_buf::from_raw_parts(data.as_ptr(), data.len()) } -} - -pub fn compiler_snapshot() -> deno_buf { - #[cfg(not(feature = "check-only"))] - let data = - include_bytes!(concat!(env!("GN_OUT_DIR"), "/gen/snapshot_compiler.bin")); - // The snapshot blob is not available when the Rust Language Server runs - // 'cargo check'. - #[cfg(feature = "check-only")] - let data = vec![]; - - unsafe { deno_buf::from_raw_parts(data.as_ptr(), data.len()) } -} |