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 _dart_root = rebase_path("..") | 5 _dart_root = rebase_path("..") |
| 6 | 6 |
| 7 template("invoke_dart") { | 7 template("invoke_dart") { |
| 8 assert(defined(invoker.outputs), "invoke_dart must specify outputs") | 8 assert(defined(invoker.outputs), "invoke_dart must specify outputs") |
| 9 extra_deps = [] | 9 extra_deps = [] |
| 10 if (defined(invoker.deps)) { | 10 if (defined(invoker.deps)) { |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 } | 22 } |
| 23 | 23 |
| 24 action(target_name) { | 24 action(target_name) { |
| 25 relative_dart_root = rebase_path(_dart_root, ".") | 25 relative_dart_root = rebase_path(_dart_root, ".") |
| 26 deps = extra_deps + [ | 26 deps = extra_deps + [ |
| 27 "$relative_dart_root/runtime/bin:dart($host_toolchain)", | 27 "$relative_dart_root/runtime/bin:dart($host_toolchain)", |
| 28 ] | 28 ] |
| 29 | 29 |
| 30 dart_out_dir = get_label_info( | 30 dart_out_dir = get_label_info( |
| 31 "$relative_dart_root/runtime/bin:dart($host_toolchain)", "root_out_dir") | 31 "$relative_dart_root/runtime/bin:dart($host_toolchain)", "root_out_dir") |
| 32 # TODO(zra): Add platform specific executable suffix (e.g. .exe on win) | 32 if (is_win) { |
| 33 dart = rebase_path("$dart_out_dir/dart") | 33 dart = rebase_path("$dart_out_dir/dart.exe") |
|
Cutch
2016/10/04 15:58:48
is there some kind ${executable_suffix} variable t
zra
2016/10/04 16:08:35
Toolchain definitions know what the extension will
| |
| 34 } else { | |
| 35 dart = rebase_path("$dart_out_dir/dart") | |
| 36 } | |
| 34 | 37 |
| 35 inputs = [ | 38 inputs = [ |
| 36 dart, | 39 dart, |
| 37 ] + extra_inputs | 40 ] + extra_inputs |
| 38 | 41 |
| 39 outputs = invoker.outputs | 42 outputs = invoker.outputs |
| 40 | 43 |
| 41 script = "$_dart_root/tools/dart_for_gn.py" | 44 script = "$_dart_root/tools/dart_for_gn.py" |
| 42 args = [ | 45 args = [ |
| 43 dart, | 46 dart, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 abs_output = rebase_path(output) | 82 abs_output = rebase_path(output) |
| 80 main_file = rebase_path(main_dart) | 83 main_file = rebase_path(main_dart) |
| 81 | 84 |
| 82 args = [ | 85 args = [ |
| 83 "--packages=$dot_packages", | 86 "--packages=$dot_packages", |
| 84 "--snapshot=$abs_output", | 87 "--snapshot=$abs_output", |
| 85 main_file | 88 main_file |
| 86 ] | 89 ] |
| 87 } | 90 } |
| 88 } | 91 } |
| OLD | NEW |