Popular sites on the NTP: Favicon improvements
[chromium-blink-merge.git] / tools / android / md5sum / BUILD.gn
blobf762615422fe28b6a8ff6b89082f378b58b03941
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_prepare_dist($default_toolchain)",
9     ":md5sum_copy_host($host_toolchain)",
10   ]
12   # TODO(cjhopman): Remove once group datadeps are fixed.
13   deps = datadeps
16 # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_device (and md5sum_bin_host)
17 executable("md5sum_bin") {
18   sources = [
19     "md5sum.cc",
20   ]
21   deps = [
22     "//base",
23   ]
25   # TODO(GYP)
26   #'conditions': [
27   #[ 'order_profiling!=0 and OS=="android"', {
28   #'dependencies': [ '../../../tools/cygprofile/cygprofile.gyp:cygprofile', ],
29   #}],
30   #],
33 if (current_toolchain == default_toolchain) {
34   import("//build/config/android/rules.gni")
36   # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_stripped_device_bin
37   create_native_executable_dist("md5sum_prepare_dist") {
38     dist_dir = "$root_build_dir/md5sum_dist"
39     binary = "$root_build_dir/md5sum_bin"
40     deps = [
41       ":md5sum_bin",
42     ]
43   }
44 } else {
45   # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_host
46   action("md5sum_copy_host") {
47     # Symlink rather than copy. When copied and using a component build, it
48     # fails to find libbase.so (since it's actually at clang_x64/libbase.so).
49     script = "//build/symlink.py"
50     _src = "$root_out_dir/md5sum_bin"
51     _target = "$root_build_dir/md5sum_bin_host"
52     sources = [
53       _src,
54     ]
55     outputs = [
56       _target,
57     ]
58     deps = [
59       ":md5sum_bin",
60     ]
61     args = [
62       "-f",
63       rebase_path(_src, root_build_dir),
64       rebase_path(_target, root_build_dir),
65     ]
66   }