From d61ebd4ed24ec196f472ab55224220941635da8e Mon Sep 17 00:00:00 2001 From: Ivan Posva Date: Thu, 3 Mar 2016 14:53:59 -0800 Subject: [PATCH] - Unify dart_no_snapshot and dart_bootstrap into one binary. BUG= R=johnmccutchan@google.com Review URL: https://codereview.chromium.org/1760063003 . --- dart.gyp | 2 +- runtime/bin/bin.gypi | 95 +------------------ .../precompilation_dart2js_test.dart | 2 +- tests/standalone/precompilation_test.dart | 2 +- 4 files changed, 4 insertions(+), 97 deletions(-) diff --git a/dart.gyp b/dart.gyp index 918e5d692e3..9ac4105dade 100644 --- a/dart.gyp +++ b/dart.gyp @@ -28,7 +28,7 @@ 'runtime/dart-runtime.gyp:dart_noopt', 'runtime/dart-runtime.gyp:dart_precompiled_runtime', 'runtime/dart-runtime.gyp:dart_product', - 'runtime/dart-runtime.gyp:dart_no_snapshot', + 'runtime/dart-runtime.gyp:dart_bootstrap#host', 'runtime/dart-runtime.gyp:run_vm_tests', 'runtime/dart-runtime.gyp:process_test', 'packages', diff --git a/runtime/bin/bin.gypi b/runtime/bin/bin.gypi index 5d7b48e2a98..08401257f56 100644 --- a/runtime/bin/bin.gypi +++ b/runtime/bin/bin.gypi @@ -15,8 +15,6 @@ 'isolate_snapshot_bin_file': '<(gen_source_dir)/isolate_snapshot_gen.bin', 'gen_snapshot_stamp_file': '<(gen_source_dir)/gen_snapshot.stamp', 'resources_cc_file': '<(gen_source_dir)/resources_gen.cc', - 'bootstrap_resources_cc_file': - '<(gen_source_dir)/bootstrap_resources_gen.cc', 'snapshot_cc_file': '<(gen_source_dir)/snapshot_gen.cc', 'observatory_assets_cc_file': '<(gen_source_dir)/observatory_assets.cc', 'observatory_assets_tar_file': '<(gen_source_dir)/observatory_assets.tar', @@ -542,41 +540,6 @@ }, ] }, - { - 'target_name': 'generate_bootstrap_resources_cc_file', - 'type': 'none', - 'dependencies': [ - 'bin/zlib.gyp:zlib_dart', - ], - 'toolsets':['host'], - 'includes': [ - 'vmservice/vmservice_sources.gypi', - ], - 'actions': [ - { - 'action_name': 'generate_resources_cc', - 'inputs': [ - '../tools/create_resources.py', - '<@(_sources)', - ], - 'outputs': [ - '<(bootstrap_resources_cc_file)', - ], - 'action': [ - 'python', - 'tools/create_resources.py', - '--output', '<(bootstrap_resources_cc_file)', - '--outer_namespace', 'dart', - '--inner_namespace', 'bin', - '--table_name', 'service_bin', - '--root_prefix', 'bin/', - '<@(_sources)' - ], - 'message': - 'Generating ''<(bootstrap_resources_cc_file)'' file.' - }, - ] - }, { # dart_product binary. 'target_name': 'dart_product', @@ -776,67 +739,11 @@ 'target_name': 'dart_bootstrap', 'type': 'executable', 'toolsets':['host'], - 'dependencies': [ - 'libdart_nosnapshot', - 'libdart_builtin', - 'libdart_io', - 'generate_bootstrap_resources_cc_file#host', - ], - 'include_dirs': [ - '..', - '../../third_party/', # Zlib - ], - 'sources': [ - 'main.cc', - 'builtin_common.cc', - 'builtin_natives.cc', - 'builtin.cc', - 'builtin.h', - 'io_natives.h', - 'vmservice_impl.cc', - 'vmservice_impl.h', - # Include generated source files. - '<(builtin_cc_file)', - '<(io_cc_file)', - '<(io_patch_cc_file)', - '<(bootstrap_resources_cc_file)', - 'observatory_assets_empty.cc', - 'snapshot_empty.cc', - ], - 'conditions': [ - ['OS=="win"', { - 'link_settings': { - 'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib', '-lwinmm.lib' ], - }, - # Generate an import library on Windows, by exporting a function. - # Extensions use this import library to link to the API in dart.exe. - 'msvs_settings': { - 'VCLinkerTool': { - 'AdditionalOptions': [ '/EXPORT:Dart_True' ], - }, - }, - }], - ], - 'configurations': { - 'Dart_Linux_Base': { - # Have the linker add all symbols to the dynamic symbol table - # so that extensions can look them up dynamically in the binary. - 'ldflags': [ - '-rdynamic', - ], - }, - }, - }, - { - # dart binary without any snapshot built in. - 'target_name': 'dart_no_snapshot', - 'type': 'executable', 'dependencies': [ 'libdart_nosnapshot', 'libdart_builtin', 'libdart_io', 'generate_resources_cc_file#host', - 'generate_observatory_assets_cc_file#host', ], 'include_dirs': [ '..', @@ -856,7 +763,7 @@ '<(io_cc_file)', '<(io_patch_cc_file)', '<(resources_cc_file)', - '<(observatory_assets_cc_file)', + 'observatory_assets_empty.cc', 'snapshot_empty.cc', ], 'defines': [ diff --git a/tests/standalone/precompilation_dart2js_test.dart b/tests/standalone/precompilation_dart2js_test.dart index 0deafcb2e87..b9647266164 100644 --- a/tests/standalone/precompilation_dart2js_test.dart +++ b/tests/standalone/precompilation_dart2js_test.dart @@ -49,7 +49,7 @@ main(List args) { Directory tmp; try { tmp = Directory.current.createTempSync("temp_precompilation_test"); - var exec = "${dart_executable}_no_snapshot"; + var exec = "${dart_executable}_bootstrap"; var args = ["--package-root=$abs_package_root", "--gen-precompiled-snapshot", "${abs_package_root}compiler/src/dart2js.dart"]; diff --git a/tests/standalone/precompilation_test.dart b/tests/standalone/precompilation_test.dart index e65bf17bac3..ad493c9ae63 100644 --- a/tests/standalone/precompilation_test.dart +++ b/tests/standalone/precompilation_test.dart @@ -49,7 +49,7 @@ main(List args) { try { tmp = Directory.current.createTempSync("temp_precompilation_test"); var result = Process.runSync( - "${dart_executable}_no_snapshot", + "${dart_executable}_bootstrap", ["--gen-precompiled-snapshot", Platform.script.path], workingDirectory: tmp.path); if (result.exitCode != 0) {