OLD | NEW |
(Empty) | |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 template("run_executable") { |
| 6 action("${target_name}") { |
| 7 script = "//build/gn_run_binary.py" |
| 8 |
| 9 if (defined(invoker.sources)) { |
| 10 sources = invoker.sources |
| 11 } |
| 12 if (defined(invoker.outputs)) { |
| 13 outputs = invoker.outputs |
| 14 } |
| 15 if (defined(invoker.source_prereqs)) { |
| 16 source_prereqs = invoker.source_prereqs |
| 17 } |
| 18 |
| 19 args = [ |
| 20 host_toolchain, |
| 21 current_toolchain, |
| 22 rebase_path(root_out_dir + "/" + invoker.binary_name, root_build_dir) |
| 23 ] |
| 24 if (defined(invoker.args)) { |
| 25 args += invoker.args |
| 26 } |
| 27 |
| 28 if (defined(invoker.datadeps)) { |
| 29 datadeps += invoker.datadeps |
| 30 } |
| 31 if (defined(invoker.deps)) { |
| 32 deps = invoker.deps |
| 33 } |
| 34 } |
| 35 } |
| 36 |
| 37 template("run_executable_foreach") { |
| 38 action_foreach("${target_name}") { |
| 39 script = "//build/gn_run_binary.py" |
| 40 sources = invoker.sources |
| 41 if (defined(invoker.outputs)) { |
| 42 outputs = invoker.outputs |
| 43 } |
| 44 if (defined(invoker.source_prereqs)) { |
| 45 source_prereqs = invoker.source_prereqs |
| 46 } |
| 47 |
| 48 args = [ |
| 49 host_toolchain, |
| 50 current_toolchain, |
| 51 rebase_path(root_out_dir + "/" + invoker.binary_name, root_build_dir) |
| 52 ] |
| 53 if (defined(invoker.args)) { |
| 54 args += invoker.args |
| 55 } |
| 56 |
| 57 if (defined(invoker.datadeps)) { |
| 58 datadeps += invoker.datadeps |
| 59 } |
| 60 if (defined(invoker.deps)) { |
| 61 deps = invoker.deps |
| 62 } |
| 63 } |
| 64 } |
| 65 |
OLD | NEW |