| OLD | NEW |
| 1 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2017, 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/prebuilt_dart_sdk.gni") | 5 import("../build/prebuilt_dart_sdk.gni") |
| 6 import("../build/dart_host_toolchain.gni") | 6 import("../build/dart_host_toolchain.gni") |
| 7 | 7 |
| 8 _dart_root = get_path_info("..", "abspath") | 8 _dart_root = get_path_info("..", "abspath") |
| 9 | 9 |
| 10 # Template to generate a patched_sdk folder. This invokes the tools/patch_sdk.py | 10 # Template to generate a patched_sdk folder. This invokes the tools/patch_sdk.py |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 # We list the `patch_sdk.dart` tool here because the [script] (which is | 37 # We list the `patch_sdk.dart` tool here because the [script] (which is |
| 38 # implicitly an input) will call it. | 38 # implicitly an input) will call it. |
| 39 inputs = [ | 39 inputs = [ |
| 40 "$_dart_root/tools/patch_sdk.dart", | 40 "$_dart_root/tools/patch_sdk.dart", |
| 41 ] | 41 ] |
| 42 | 42 |
| 43 depfile = "$root_out_dir/${target_name}.d" | 43 depfile = "$root_out_dir/${target_name}.d" |
| 44 | 44 |
| 45 outputs = [ | 45 outputs = [ |
| 46 # Instead of listing all outputs we list a single well-known one. | 46 # Instead of listing all outputs we list those consumed by |
| 47 # other BUILD rules. |
| 47 "$root_out_dir/${invoker.patched_sdk_dir}/platform.dill", | 48 "$root_out_dir/${invoker.patched_sdk_dir}/platform.dill", |
| 49 "$root_out_dir/${invoker.patched_sdk_dir}/outline.dill", |
| 48 ] | 50 ] |
| 49 | 51 |
| 50 args = [ "--quiet" ] | 52 args = [ "--quiet" ] |
| 51 if (!prebuilt_dart_exe_works) { | 53 if (!prebuilt_dart_exe_works) { |
| 52 dart_out_dir = get_label_info( | 54 dart_out_dir = get_label_info( |
| 53 "$_dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)", | 55 "$_dart_root/runtime/bin:dart_bootstrap($dart_host_toolchain)", |
| 54 "root_out_dir") | 56 "root_out_dir") |
| 55 dart_bootstrap = | 57 dart_bootstrap = |
| 56 rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix") | 58 rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix") |
| 57 args += [ | 59 args += [ |
| 58 "--dart-executable", | 60 "--dart-executable", |
| 59 dart_bootstrap, | 61 dart_bootstrap, |
| 60 ] | 62 ] |
| 61 } | 63 } |
| 62 args += [ | 64 args += [ |
| 63 invoker.mode, | 65 invoker.mode, |
| 64 rebase_path("$_dart_root/sdk"), | 66 rebase_path("$_dart_root/sdk"), |
| 65 rebase_path(invoker.input_patches_dir), | 67 rebase_path(invoker.input_patches_dir), |
| 66 rebase_path("$root_out_dir/${invoker.patched_sdk_dir}", root_build_dir), | 68 rebase_path("$root_out_dir/${invoker.patched_sdk_dir}", root_build_dir), |
| 67 rebase_path("$_dart_root/.packages"), | 69 rebase_path("$_dart_root/.packages"), |
| 68 ] | 70 ] |
| 69 } | 71 } |
| 70 } | 72 } |
| OLD | NEW |