Fixes for Android GN build input/outputs
[chromium-blink-merge.git] / tools / android / md5sum / BUILD.gn
blob6f80ba676b5e24fd28feea628d2d9bf807bc6ec9
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.
5 # GYP: //tools/android/md5sum/md5sum.gyp:md5sum
6 group("md5sum") {
7   datadeps = [
8     ":md5sum_bin($host_toolchain)",
9     ":md5sum_bin($default_toolchain)",
10     ":md5sum_prepare_dist($default_toolchain)",
11     ":md5sum_copy_host($host_toolchain)",
12   ]
14   # TODO(cjhopman): Remove once group datadeps are fixed.
15   deps = datadeps
18 # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_device (and md5sum_bin_host)
19 executable("md5sum_bin") {
20   sources = [
21     "md5sum.cc",
22   ]
23   deps = [
24     "//base",
25   ]
27   # TODO(GYP)
28   #'conditions': [
29   #[ 'order_profiling!=0 and OS=="android"', {
30   #'dependencies': [ '../../../tools/cygprofile/cygprofile.gyp:cygprofile', ],
31   #}],
32   #],
35 if (current_toolchain == default_toolchain) {
36   import("//build/config/android/rules.gni")
38   # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_stripped_device_bin
39   create_native_executable_dist("md5sum_prepare_dist") {
40     dist_dir = "$root_build_dir/md5sum_dist"
41     binary = "$root_build_dir/exe.stripped/md5sum_bin"
42   }
43 } else {
44   # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_host
45   copy("md5sum_copy_host") {
46     sources = [
47       "$root_out_dir/md5sum_bin",
48     ]
49     outputs = [
50       "$root_build_dir/md5sum_bin_host",
51     ]
52     deps = [
53       ":md5sum_bin",
54     ]
55   }