Roll src/third_party/WebKit 9d2dfea:3aea697 (svn 201972:201973)
[chromium-blink-merge.git] / tools / android / md5sum / BUILD.gn
blob6559904c16a9271af66cfda52436acbbfac3e4ef
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     "//build/config/sanitizers:deps",
24   ]
26   # TODO(GYP)
27   #'conditions': [
28   #[ 'order_profiling!=0 and OS=="android"', {
29   #'dependencies': [ '../../../tools/cygprofile/cygprofile.gyp:cygprofile', ],
30   #}],
31   #],
34 if (current_toolchain == default_toolchain) {
35   import("//build/config/android/rules.gni")
37   # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_stripped_device_bin
38   create_native_executable_dist("md5sum_prepare_dist") {
39     dist_dir = "$root_build_dir/md5sum_dist"
40     binary = "$root_build_dir/md5sum_bin"
41     deps = [
42       ":md5sum_bin",
43     ]
44   }
45 } else {
46   # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_host
47   action("md5sum_copy_host") {
48     # Symlink rather than copy. When copied and using a component build, it
49     # fails to find libbase.so (since it's actually at clang_x64/libbase.so).
50     script = "//build/symlink.py"
51     _src = "$root_out_dir/md5sum_bin"
52     _target = "$root_build_dir/md5sum_bin_host"
53     sources = [
54       _src,
55     ]
56     outputs = [
57       _target,
58     ]
59     deps = [
60       ":md5sum_bin",
61     ]
62     args = [
63       "-f",
64       rebase_path(_src, root_build_dir),
65       rebase_path(_target, root_build_dir),
66     ]
67   }