提交 b39f4c14 编写于 作者: R Ryan Dahl

gn snapshot template's target_name should be target

上级 f727214d
......@@ -113,8 +113,8 @@ ts_sources = [
group("deno_deps") {
deps = [
":create_snapshot_deno",
":msg_rs",
":snapshot_deno",
"libdeno:libdeno",
]
}
......@@ -210,7 +210,7 @@ rust_flatbuffer("msg_rs") {
}
# Generates $target_gen_dir/snapshot_deno.bin
create_snapshot("deno") {
snapshot("snapshot_deno") {
js = "$target_gen_dir/bundle/main.js"
source_map = "$target_gen_dir/bundle/main.js.map"
deps = [
......
......@@ -83,20 +83,20 @@ v8_executable("test_cc") {
"test.cc",
]
deps = [
":create_snapshot_libdeno_test",
":libdeno",
":snapshot_test",
"//testing/gtest:gtest",
]
data = [
"$target_gen_dir/snapshot_libdeno_test.bin",
"$target_gen_dir/snapshot_test.bin",
]
snapshot_path = rebase_path(data[0], root_build_dir)
defines = [ "SNAPSHOT_PATH=\"$snapshot_path\"" ]
configs = [ ":deno_config" ]
}
# Generates $target_gen_dir/snapshot_libdeno_test.bin
create_snapshot("libdeno_test") {
# Generates $target_gen_dir/snapshot_test.bin
snapshot("snapshot_test") {
testonly = true
js = "libdeno_test.js"
}
......@@ -14,18 +14,8 @@ template("run_node") {
}
# Template to generate different V8 snapshots based on different runtime flags.
# Can be invoked with run_mksnapshot(<name>). The target will resolve to
# run_mksnapshot_<name>. If <name> is "default", no file suffixes will be used.
# Otherwise files are suffixed, e.g. embedded_<name>.cc and
# snapshot_blob_<name>.bin.
#
# The template exposes the variables:
# args: additional flags for mksnapshots
# embedded_suffix: a camel case suffix for method names in the embedded
# snapshot.
template("create_snapshot") {
name = target_name
compiled_action("create_snapshot_" + name) {
template("snapshot") {
compiled_action(target_name) {
forward_variables_from(invoker,
[
"testonly",
......@@ -33,10 +23,13 @@ template("create_snapshot") {
])
tool = "//libdeno:snapshot_creator"
visibility = [ ":*" ] # Only targets in this file can depend on this.
snapshot_out_bin = "$target_gen_dir/snapshot_$name.bin"
snapshot_out_bin = "$target_gen_dir/$target_name.bin"
inputs = [
invoker.js,
]
# TODO(ry) source_map should not be involved at this layer. Remove the
# following.
if (defined(invoker.source_map)) {
inputs += [ invoker.source_map ]
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册