diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-01-31 12:43:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-31 12:43:08 -0500 |
commit | 1dc8afe3afc483703641c907075e2d8aa7396cfd (patch) | |
tree | 15db32079bc4aa59ed3821c613e3c3a5daf008ab /cli/build.rs | |
parent | e1697421e2c00508cd78976b6ec586e056530c30 (diff) |
Add NO_BUILD_SNAPSHOTS to speed up incremental builds (#3847)
Diffstat (limited to 'cli/build.rs')
-rw-r--r-- | cli/build.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/build.rs b/cli/build.rs index ed04986a4..7e073c8ff 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -47,6 +47,16 @@ fn main() { deno_typescript::ts_version() ); + // The generation of snapshots is slow and often unnecessary. Until we figure + // out how to speed it up, or avoid it when unnecessary, this env var provides + // an escape hatch for the impatient hacker in need of faster incremental + // builds. + // USE WITH EXTREME CAUTION + if env::var_os("NO_BUILD_SNAPSHOTS").is_some() { + println!("NO_BUILD_SNAPSHOTS is set, skipping snapshot building."); + return; + } + let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap()); let o = PathBuf::from(env::var_os("OUT_DIR").unwrap()); |