summaryrefslogtreecommitdiff
path: root/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn38
1 files changed, 20 insertions, 18 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 72517055c..441d89a70 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -117,6 +117,7 @@ ts_sources = [
group("deno_deps") {
deps = [
":msg_rs",
+ ":snapshot_compiler",
":snapshot_deno",
"libdeno:libdeno_static_lib",
]
@@ -195,28 +196,21 @@ run_node("deno_runtime_declaration") {
}
}
-run_node("bundle") {
+bundle("main_bundle") {
out_dir = "$target_gen_dir/bundle/"
- outputs = [
- out_dir + "main.js",
- out_dir + "main.js.map",
- ]
- depfile = out_dir + "main.d"
+ out_name = "main"
deps = [
":deno_runtime_declaration",
":msg_ts",
]
- args = [
- rebase_path("third_party/node_modules/rollup/bin/rollup", root_build_dir),
- "-c",
- rebase_path("rollup.config.js", root_build_dir),
- "-i",
- rebase_path("js/main.ts", root_build_dir),
- "-o",
- rebase_path(out_dir + "main.js", root_build_dir),
- "--sourcemapFile",
- rebase_path("."),
- "--silent",
+}
+
+bundle("compiler_bundle") {
+ out_dir = "$target_gen_dir/bundle/"
+ out_name = "compiler"
+ deps = [
+ ":deno_runtime_declaration",
+ ":msg_ts",
]
}
@@ -236,6 +230,14 @@ rust_flatbuffer("msg_rs") {
snapshot("snapshot_deno") {
source_root = "$target_gen_dir/bundle/main.js"
deps = [
- ":bundle",
+ ":main_bundle",
+ ]
+}
+
+# Generates $target_gen_dir/snapshot_compiler.bin
+snapshot("snapshot_compiler") {
+ source_root = "$target_gen_dir/bundle/compiler.js"
+ deps = [
+ ":compiler_bundle",
]
}