mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
build: use compiled_action for create_snapshot.
Switch the order of the snapshot_creator args, in order to allow for optional source map arg.
This commit is contained in:
parent
9a42fcad9f
commit
ae82db54f6
2 changed files with 8 additions and 16 deletions
|
@ -1,4 +1,5 @@
|
|||
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
||||
import("//build/compiled_action.gni")
|
||||
|
||||
template("run_node") {
|
||||
action(target_name) {
|
||||
|
@ -19,36 +20,27 @@ template("run_node") {
|
|||
# snapshot.
|
||||
template("create_snapshot") {
|
||||
name = target_name
|
||||
suffix = "_$name"
|
||||
action("create_snapshot_" + name) {
|
||||
compiled_action("create_snapshot_" + name) {
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
"testonly",
|
||||
"deps",
|
||||
])
|
||||
tool = ":snapshot_creator"
|
||||
visibility = [ ":*" ] # Only targets in this file can depend on this.
|
||||
deps += [ ":snapshot_creator" ]
|
||||
script = "//third_party/v8/tools/run.py"
|
||||
data = []
|
||||
exe = rebase_path(get_label_info(":snapshot_creator", "root_out_dir") +
|
||||
"/snapshot_creator")
|
||||
snapshot_out_cc = "$target_gen_dir/snapshot${suffix}.cc"
|
||||
sources = [
|
||||
snapshot_out_cc = "$target_gen_dir/snapshot_$name.cc"
|
||||
inputs = [
|
||||
invoker.js,
|
||||
]
|
||||
outputs = [
|
||||
snapshot_out_cc,
|
||||
]
|
||||
args = [
|
||||
exe,
|
||||
rebase_path(invoker.js, root_build_dir),
|
||||
rebase_path(snapshot_out_cc, root_build_dir),
|
||||
rebase_path(invoker.js, root_build_dir),
|
||||
]
|
||||
|
||||
# To debug snapshotting problems:
|
||||
# args += ["--trace-serializer"]
|
||||
data = [
|
||||
invoker.js,
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,8 +98,8 @@ class StartupDataCppWriter {
|
|||
} // namespace deno
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
const char* js_fn = argv[1];
|
||||
const char* snapshot_out_cc = argv[2];
|
||||
const char* snapshot_out_cc = argv[1];
|
||||
const char* js_fn = argv[2];
|
||||
|
||||
v8::V8::SetFlagsFromCommandLine(&argc, argv, true);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue