OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 action("generate_snapshot_bin") { | 5 action("generate_snapshot_bin") { |
6 deps = ["//dart/runtime/bin:gen_snapshot"] | 6 deps = [ |
| 7 "//dart/runtime/bin:gen_snapshot", |
| 8 ] |
7 inputs = [ | 9 inputs = [ |
8 "//dart/runtime/tools/create_snapshot_bin.py", | 10 "//dart/runtime/tools/create_snapshot_bin.py", |
9 "//mojo/dart/embedder/builtin.dart", | 11 "//mojo/dart/embedder/builtin.dart", |
10 "//mojo/public/dart/bindings.dart", | 12 "//mojo/public/dart/bindings.dart", |
11 "//mojo/public/dart/core.dart", | 13 "//mojo/public/dart/core.dart", |
12 "snapshot.dart", | 14 "snapshot.dart", |
13 ] | 15 ] |
14 output = "$target_gen_dir/snapshot_gen.bin" | 16 output = "$target_gen_dir/snapshot_gen.bin" |
15 outputs = [output,] | 17 outputs = [ |
| 18 output, |
| 19 ] |
16 | 20 |
17 script = "//dart/runtime/tools/create_snapshot_bin.py" | 21 script = "//dart/runtime/tools/create_snapshot_bin.py" |
18 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart") | 22 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart") |
19 bindings_path = rebase_path("//mojo/public/dart/bindings.dart") | 23 bindings_path = rebase_path("//mojo/public/dart/bindings.dart") |
20 core_path = rebase_path("//mojo/public/dart/core.dart") | 24 core_path = rebase_path("//mojo/public/dart/core.dart") |
21 args = [ | 25 args = [ |
22 "--executable", rebase_path("$root_out_dir/gen_snapshot"), | 26 "--executable", |
23 "--script", rebase_path("snapshot.dart"), | 27 rebase_path("$root_out_dir/gen_snapshot"), |
24 "--output_bin", rebase_path(output, root_build_dir), | 28 "--script", |
25 "--target_os", os, | 29 rebase_path("snapshot.dart"), |
| 30 "--output_bin", |
| 31 rebase_path(output, root_build_dir), |
| 32 "--target_os", |
| 33 os, |
26 "--url_mapping=dart:mojo_bindings,$bindings_path", | 34 "--url_mapping=dart:mojo_bindings,$bindings_path", |
27 "--url_mapping=dart:mojo_builtin,$builtin_path", | 35 "--url_mapping=dart:mojo_builtin,$builtin_path", |
28 "--url_mapping=dart:mojo_core,$core_path", | 36 "--url_mapping=dart:mojo_core,$core_path", |
29 ] | 37 ] |
30 } | 38 } |
31 | 39 |
32 | |
33 action("generate_snapshot_file") { | 40 action("generate_snapshot_file") { |
34 deps = [":generate_snapshot_bin"] | 41 deps = [ |
| 42 ":generate_snapshot_bin", |
| 43 ] |
35 inputs = [ | 44 inputs = [ |
36 "//dart/runtime/tools/create_snapshot_file.py", | 45 "//dart/runtime/tools/create_snapshot_file.py", |
37 "snapshot.cc.tmpl", | 46 "snapshot.cc.tmpl", |
38 "$target_gen_dir/snapshot_gen.bin", | 47 "$target_gen_dir/snapshot_gen.bin", |
39 ] | 48 ] |
40 output = "$target_gen_dir/snapshot.cc" | 49 output = "$target_gen_dir/snapshot.cc" |
41 outputs = [output,] | 50 outputs = [ |
| 51 output, |
| 52 ] |
42 | 53 |
43 script = "//dart/runtime/tools/create_snapshot_file.py" | 54 script = "//dart/runtime/tools/create_snapshot_file.py" |
44 args = [ | 55 args = [ |
45 "--input_bin", rebase_path("$target_gen_dir/snapshot_gen.bin"), | 56 "--input_bin", |
46 "--input_cc", rebase_path("snapshot.cc.tmpl"), | 57 rebase_path("$target_gen_dir/snapshot_gen.bin"), |
47 "--output", rebase_path(output), | 58 "--input_cc", |
| 59 rebase_path("snapshot.cc.tmpl"), |
| 60 "--output", |
| 61 rebase_path(output), |
48 ] | 62 ] |
49 } | 63 } |
50 | 64 |
51 | |
52 source_set("dart_controller") { | 65 source_set("dart_controller") { |
53 deps = [ | 66 deps = [ |
54 "//dart/runtime/bin:libdart_embedder_noio", | 67 "//dart/runtime/bin:libdart_embedder_noio", |
55 ":generate_snapshot_file", | 68 ":generate_snapshot_file", |
56 ] | 69 ] |
57 sources = [ | 70 sources = [ |
58 "builtin.cc", | 71 "builtin.cc", |
59 "builtin.h", | 72 "builtin.h", |
60 "builtin_natives.cc", | 73 "builtin_natives.cc", |
61 "dart_controller.cc", | 74 "dart_controller.cc", |
62 "dart_controller.h", | 75 "dart_controller.h", |
63 "isolate_data.h", | 76 "isolate_data.h", |
64 "mojo_natives.cc", | 77 "mojo_natives.cc", |
65 "mojo_natives.h", | 78 "mojo_natives.h", |
66 "$target_gen_dir/snapshot.cc", | 79 "$target_gen_dir/snapshot.cc", |
67 ] | 80 ] |
68 | 81 |
69 defines = [] | 82 defines = [] |
70 if (is_debug) { | 83 if (is_debug) { |
71 defines += ["DEBUG"] | 84 defines += [ "DEBUG" ] |
72 } else { | 85 } else { |
73 defines += ["NDEBUG"] | 86 defines += [ "NDEBUG" ] |
74 } | 87 } |
75 | 88 |
76 include_dirs = [ | 89 include_dirs = [ "//dart/runtime" ] |
77 "//dart/runtime", | |
78 ] | |
79 } | 90 } |
OLD | NEW |