Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 # for details. All rights reserved. Use of this source code is governed by a | 2 # for details. All rights reserved. Use of this source code is governed by a |
| 3 # BSD-style license that can be found in the LICENSE file. | 3 # BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import("../../build/compiled_action.gni") | 5 import("../../build/compiled_action.gni") |
| 6 import("../../build/prebuilt_dart_sdk.gni") | |
| 6 import("../create_timestamp.gni") | 7 import("../create_timestamp.gni") |
| 7 import("../application_snapshot.gni") | 8 import("../application_snapshot.gni") |
| 8 | 9 |
| 9 create_timestamp_file("dart2js_files_stamp") { | 10 create_timestamp_file("dart2js_files_stamp") { |
| 10 path = rebase_path("../../pkg/compiler/lib") | 11 path = rebase_path("../../pkg/compiler/lib") |
| 11 output = "$target_gen_dir/dart2js_files.stamp" | 12 output = "$target_gen_dir/dart2js_files.stamp" |
| 12 } | 13 } |
| 13 | 14 |
| 14 create_timestamp_file("runtime_lib_files_stamp") { | 15 create_timestamp_file("runtime_lib_files_stamp") { |
| 15 path = rebase_path("../../runtime/lib") | 16 path = rebase_path("../../runtime/lib") |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 ] | 69 ] |
| 69 } | 70 } |
| 70 | 71 |
| 71 application_snapshot("utils_wrapper") { | 72 application_snapshot("utils_wrapper") { |
| 72 deps = [ | 73 deps = [ |
| 73 ":dart2js_create_snapshot_entries", | 74 ":dart2js_create_snapshot_entries", |
| 74 ] | 75 ] |
| 75 main_dart = "$target_gen_dir/utils_wrapper.dart" | 76 main_dart = "$target_gen_dir/utils_wrapper.dart" |
| 76 training_args = [ "--help" ] | 77 training_args = [ "--help" ] |
| 77 } | 78 } |
| 79 | |
| 80 action("patched_dart2js_sdk") { | |
|
Vyacheslav Egorov (Google)
2017/04/27 14:07:23
It might be a good idea to move all shared GN rule
Siggi Cherem (dart-lang)
2017/04/28 21:37:21
Done.
| |
| 81 deps = ["../../runtime/vm:patched_sdk"] | |
| 82 if (!prebuilt_dart_exe_works) { | |
| 83 deps += ["../../runtime/bin:dart_bootstrap($host_toolchain)"] | |
| 84 } | |
| 85 | |
| 86 patches_dir = "../../sdk/lib/_internal/js_runtime/lib" | |
| 87 patched_sdk_dir = "$root_out_dir/patched_dart2js_sdk" | |
| 88 | |
| 89 script = "../../tools/patch_sdk.py" | |
| 90 | |
| 91 # We list the `patch_sdk.dart` tool here because the [script] (which is | |
| 92 # implicitly an input) will call it. | |
| 93 inputs = [ | |
| 94 "../../tools/patch_sdk.dart", | |
| 95 ] | |
| 96 depfile = "$root_out_dir/patched_dart2js_sdk.d" | |
| 97 | |
| 98 outputs = [ | |
| 99 # Instead of listing all outputs we list a single well-known one. | |
| 100 "${patched_sdk_dir}/platform.dill", | |
| 101 ] | |
| 102 | |
| 103 args = [ "--quiet" ] | |
| 104 if (!prebuilt_dart_exe_works) { | |
| 105 dart_out_dir = get_label_info( | |
| 106 "../../runtime/bin:dart_bootstrap($host_toolchain)", "root_out_dir") | |
| 107 dart_bootstrap = | |
| 108 rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix") | |
| 109 args += [ | |
| 110 "--dart-executable", | |
| 111 dart_bootstrap, | |
| 112 ] | |
| 113 } | |
| 114 args += [ | |
| 115 "dart2js", | |
| 116 rebase_path("../../sdk"), | |
| 117 rebase_path(patches_dir), | |
| 118 rebase_path(patched_sdk_dir, root_build_dir), | |
| 119 rebase_path("../../.packages"), | |
| 120 ] | |
| 121 } | |
| OLD | NEW |