summaryrefslogtreecommitdiff
path: root/runtime/build.rs
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2022-11-28 12:47:25 +0100
committerGitHub <noreply@github.com>2022-11-28 12:47:25 +0100
commit9202611e3695c7091f257b261af809697df959ab (patch)
treeba4dcc28d4c9caf6cc8d9c2ba10c29c0ecd498ce /runtime/build.rs
parent1dd4843b62085a2aeb3134573adf9a7c47c154e2 (diff)
fix(runtime): feature-flag snapshot from snapshot (#16843)
Diffstat (limited to 'runtime/build.rs')
-rw-r--r--runtime/build.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/build.rs b/runtime/build.rs
index 62a3da03b..5887941ca 100644
--- a/runtime/build.rs
+++ b/runtime/build.rs
@@ -169,7 +169,14 @@ mod not_docs {
}
pub fn build_snapshot(runtime_snapshot_path: PathBuf) {
- let js_files = get_js_files(env!("CARGO_MANIFEST_DIR"), "js");
+ #[allow(unused_mut)]
+ let mut js_files = get_js_files(env!("CARGO_MANIFEST_DIR"), "js");
+ #[cfg(not(feature = "snapshot_from_snapshot"))]
+ {
+ let manifest = env!("CARGO_MANIFEST_DIR");
+ let path = PathBuf::from(manifest);
+ js_files.push(path.join("js").join("99_main.js"));
+ }
create_runtime_snapshot(runtime_snapshot_path, js_files);
}
}