diff --git a/BUILD.gn b/BUILD.gn index f2e96bbbb4..f9b3afc081 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -211,8 +211,7 @@ rust_flatbuffer("msg_rs") { # Generates $target_gen_dir/snapshot_deno.bin snapshot("snapshot_deno") { - js = "$target_gen_dir/bundle/main.js" - source_map = "$target_gen_dir/bundle/main.js.map" + source_root = "$target_gen_dir/bundle/main.js" deps = [ ":bundle", ] diff --git a/libdeno/BUILD.gn b/libdeno/BUILD.gn index 47971ee01f..92c5b804e0 100644 --- a/libdeno/BUILD.gn +++ b/libdeno/BUILD.gn @@ -98,5 +98,5 @@ v8_executable("test_cc") { # Generates $target_gen_dir/snapshot_test.bin snapshot("snapshot_test") { testonly = true - js = "libdeno_test.js" + source_root = "libdeno_test.js" } diff --git a/libdeno/deno.gni b/libdeno/deno.gni index 896902207e..d81fedc72d 100644 --- a/libdeno/deno.gni +++ b/libdeno/deno.gni @@ -25,14 +25,9 @@ template("snapshot") { visibility = [ ":*" ] # Only targets in this file can depend on this. snapshot_out_bin = "$target_gen_dir/$target_name.bin" inputs = [ - invoker.js, + invoker.source_root, ] - # TODO(ry) source_map should not be involved at this layer. Remove the - # following. - if (defined(invoker.source_map)) { - inputs += [ invoker.source_map ] - } outputs = [ snapshot_out_bin, ] diff --git a/libdeno/snapshot_creator.cc b/libdeno/snapshot_creator.cc index fe9011c9db..7e29b61c84 100644 --- a/libdeno/snapshot_creator.cc +++ b/libdeno/snapshot_creator.cc @@ -12,7 +12,6 @@ namespace deno {} // namespace deno int main(int argc, char** argv) { const char* snapshot_out_bin = argv[1]; const char* js_fn = argv[2]; - const char* source_map_fn = argv[3]; // Optional. v8::V8::SetFlagsFromCommandLine(&argc, argv, true); @@ -22,12 +21,6 @@ int main(int argc, char** argv) { std::string js_source; CHECK(deno::ReadFileToString(js_fn, &js_source)); - std::string source_map; - if (source_map_fn != nullptr) { - CHECK_EQ(argc, 4); - CHECK(deno::ReadFileToString(source_map_fn, &source_map)); - } - deno_init(); deno_config config = {deno::empty_buf, nullptr}; Deno* d = deno_new_snapshotter(config, js_fn, js_source.c_str());