2018-07-23 14:46:30 -04:00
|
|
|
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
2018-07-26 14:41:36 -04:00
|
|
|
import("//build/compiled_action.gni")
|
2018-07-23 14:46:30 -04:00
|
|
|
|
2018-11-27 17:21:05 -05:00
|
|
|
declare_args() {
|
|
|
|
# Use prebuilt V8 libraries from //prebuilt/
|
|
|
|
use_prebuilt_v8 = true
|
|
|
|
}
|
|
|
|
|
2018-06-15 14:02:27 -04:00
|
|
|
template("run_node") {
|
|
|
|
action(target_name) {
|
|
|
|
forward_variables_from(invoker, "*")
|
2018-07-08 02:24:29 -04:00
|
|
|
script = "//tools/run_node.py"
|
2018-06-15 14:02:27 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Template to generate different V8 snapshots based on different runtime flags.
|
2018-12-01 01:53:37 -05:00
|
|
|
template("snapshot") {
|
|
|
|
compiled_action(target_name) {
|
2018-06-15 14:02:27 -04:00
|
|
|
forward_variables_from(invoker,
|
|
|
|
[
|
|
|
|
"testonly",
|
|
|
|
"deps",
|
|
|
|
])
|
2018-11-25 16:56:04 -05:00
|
|
|
tool = "//libdeno:snapshot_creator"
|
2018-06-15 14:02:27 -04:00
|
|
|
visibility = [ ":*" ] # Only targets in this file can depend on this.
|
2018-12-01 01:53:37 -05:00
|
|
|
snapshot_out_bin = "$target_gen_dir/$target_name.bin"
|
2018-07-26 14:41:36 -04:00
|
|
|
inputs = [
|
2018-12-11 13:07:31 -05:00
|
|
|
invoker.source_root,
|
2018-06-15 14:02:27 -04:00
|
|
|
]
|
2018-12-01 01:53:37 -05:00
|
|
|
|
2018-06-15 14:02:27 -04:00
|
|
|
outputs = [
|
2018-07-26 23:21:10 -04:00
|
|
|
snapshot_out_bin,
|
2018-06-15 14:02:27 -04:00
|
|
|
]
|
2018-08-02 13:13:32 -04:00
|
|
|
args = rebase_path(outputs, root_build_dir) +
|
|
|
|
rebase_path(inputs, root_build_dir)
|
2018-06-15 14:02:27 -04:00
|
|
|
|
|
|
|
# To debug snapshotting problems:
|
|
|
|
# args += ["--trace-serializer"]
|
|
|
|
}
|
|
|
|
}
|