Chromium Code Reviews| Index: build/config/android/internal_rules.gni |
| diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni |
| index 8cc247bb59c17c64b87d34965a347bd890302573..fe3974dc072d94fe08776c04ea54390f3e9e5ab3 100644 |
| --- a/build/config/android/internal_rules.gni |
| +++ b/build/config/android/internal_rules.gni |
| @@ -636,6 +636,61 @@ template("test_runner_script") { |
| } |
| } |
| +template("stack_script") { |
| + forward_variables_from(invoker, [ "testonly" ]) |
| + |
| + _stack_target_name = invoker.stack_target_name |
| + |
| + action(target_name) { |
| + forward_variables_from(invoker, |
| + [ |
| + "data_deps", |
| + "deps", |
| + ]) |
| + if (!defined(deps)) { |
| + deps = [] |
| + } |
| + if (!defined(data_deps)) { |
| + data_deps = [] |
| + } |
| + |
| + data_deps += |
| + [ "//third_party/android_platform/development/scripts:stack_py" ] |
| + |
| + script = "//build/android/gyp/create_stack_script.py" |
| + depfile = "$target_gen_dir/$target_name.d" |
| + |
| + stack_script = "//third_party/android_platform/development/scripts/stack" |
|
agrieve
2017/04/26 18:19:44
nit: prefix with _
jbudorick
2017/04/26 19:34:21
Done for this and generated_script.
|
| + |
| + generated_script = "$root_build_dir/bin/stack_${_stack_target_name}" |
| + |
| + outputs = [ |
| + generated_script, |
| + ] |
| + data = [ |
| + generated_script, |
| + ] |
| + |
| + args = [ |
| + "--depfile", |
| + rebase_path(depfile, root_build_dir), |
| + "--output-directory", |
| + rebase_path(root_build_dir, root_build_dir), |
| + "--script-path", |
| + rebase_path(stack_script, root_build_dir), |
| + "--script-output-path", |
| + rebase_path(generated_script, root_build_dir), |
| + "--arch=$target_cpu", |
| + ] |
| + if (defined(invoker.packed_libraries)) { |
| + args += [ |
| + "--packed-libs", |
| + invoker.packed_libraries, |
| + ] |
| + } |
| + } |
| +} |
| + |
| if (enable_java_templates) { |
| import("//build/config/zip.gni") |
| import("//third_party/ijar/ijar.gni") |