Index: runtime/bin/BUILD.gn |
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn |
index 8d56d3f7b34958db96b428548f2f13c5507b1ee8..a08cb9d25f492ca180df01bae6d7d020feeb118b 100644 |
--- a/runtime/bin/BUILD.gn |
+++ b/runtime/bin/BUILD.gn |
@@ -696,57 +696,72 @@ dart_executable("dart_precompiled_runtime") { |
] |
} |
-dart_executable("dart_bootstrap") { |
- extra_configs = [ |
- "..:dart_precompiler_config", |
- "..:dart_no_snapshot_config", |
- ] |
- extra_deps = [ |
- ":generate_builtin_cc_file", |
- ":generate_io_cc_file", |
- ":generate_io_patch_cc_file", |
- ":generate_html_cc_file", |
- ":generate_html_common_cc_file", |
- ":generate_js_cc_file", |
- ":generate_js_util_cc_file", |
- ":generate_blink_cc_file", |
- ":generate_indexed_db_cc_file", |
- ":generate_cached_patches_cc_file", |
- ":generate_web_gl_cc_file", |
- ":generate_metadata_cc_file", |
- ":generate_web_sql_cc_file", |
- ":generate_svg_cc_file", |
- ":generate_web_audio_cc_file", |
- "..:libdart_nosnapshot_with_precompiler", |
- ] |
- extra_defines = [ "NO_OBSERVATORY" ] |
- extra_sources = [ |
- "builtin.cc", |
- "builtin.h", |
- "dfe.cc", |
- "dfe.h", |
- "loader.cc", |
- "loader.h", |
- "observatory_assets_empty.cc", |
- "snapshot_empty.cc", |
+template("dart_bootstrap_template") { |
+ invoker_extra_configs = [] |
+ if (defined(invoker.extra_configs)) { |
+ invoker_extra_configs += invoker.extra_configs |
+ } |
+ dart_executable(target_name) { |
+ extra_configs = [ |
+ "..:dart_precompiler_config", |
+ "..:dart_no_snapshot_config", |
+ ] + invoker_extra_configs |
+ extra_deps = [ |
+ ":generate_builtin_cc_file", |
+ ":generate_io_cc_file", |
+ ":generate_io_patch_cc_file", |
+ ":generate_html_cc_file", |
+ ":generate_html_common_cc_file", |
+ ":generate_js_cc_file", |
+ ":generate_js_util_cc_file", |
+ ":generate_blink_cc_file", |
+ ":generate_indexed_db_cc_file", |
+ ":generate_cached_patches_cc_file", |
+ ":generate_web_gl_cc_file", |
+ ":generate_metadata_cc_file", |
+ ":generate_web_sql_cc_file", |
+ ":generate_svg_cc_file", |
+ ":generate_web_audio_cc_file", |
+ "..:libdart_nosnapshot_with_precompiler", |
+ ] |
+ extra_defines = [ "NO_OBSERVATORY" ] |
+ extra_sources = [ |
+ "builtin.cc", |
+ "builtin.h", |
+ "dfe.cc", |
+ "dfe.h", |
+ "loader.cc", |
+ "loader.h", |
+ "observatory_assets_empty.cc", |
+ "snapshot_empty.cc", |
+ |
+ # Include generated source files. |
+ "$target_gen_dir/builtin_gen.cc", |
+ "$target_gen_dir/io_gen.cc", |
+ "$target_gen_dir/io_patch_gen.cc", |
+ "$target_gen_dir/html_gen.cc", |
+ "$target_gen_dir/html_common_gen.cc", |
+ "$target_gen_dir/js_gen.cc", |
+ "$target_gen_dir/js_util_gen.cc", |
+ "$target_gen_dir/blink_gen.cc", |
+ "$target_gen_dir/indexed_db_gen.cc", |
+ "$target_gen_dir/cached_patches_gen.cc", |
+ "$target_gen_dir/web_gl_gen.cc", |
+ "$target_gen_dir/metadata_gen.cc", |
+ "$target_gen_dir/web_sql_gen.cc", |
+ "$target_gen_dir/svg_gen.cc", |
+ "$target_gen_dir/web_audio_gen.cc", |
+ ] |
+ } |
+} |
- # Include generated source files. |
- "$target_gen_dir/builtin_gen.cc", |
- "$target_gen_dir/io_gen.cc", |
- "$target_gen_dir/io_patch_gen.cc", |
- "$target_gen_dir/html_gen.cc", |
- "$target_gen_dir/html_common_gen.cc", |
- "$target_gen_dir/js_gen.cc", |
- "$target_gen_dir/js_util_gen.cc", |
- "$target_gen_dir/blink_gen.cc", |
- "$target_gen_dir/indexed_db_gen.cc", |
- "$target_gen_dir/cached_patches_gen.cc", |
- "$target_gen_dir/web_gl_gen.cc", |
- "$target_gen_dir/metadata_gen.cc", |
- "$target_gen_dir/web_sql_gen.cc", |
- "$target_gen_dir/svg_gen.cc", |
- "$target_gen_dir/web_audio_gen.cc", |
- ] |
+dart_bootstrap_template("dart_bootstrap") { |
+ extra_configs = [ "..:dart_use_target_arch_config" ] |
+} |
+ |
+# TODO(rmacnak): Remove if Fuchsia adds a checked-in SDK. |
+dart_bootstrap_template("dart_bootstrap_host_arch") { |
+ extra_configs = [] |
} |
if (is_fuchsia) { |