| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
| 6 import("//build/symlink.gni") |
| 6 | 7 |
| 7 # GYP: //tools/android/md5sum/md5sum.gyp:md5sum | 8 # GYP: //tools/android/md5sum/md5sum.gyp:md5sum |
| 8 group("md5sum") { | 9 group("md5sum") { |
| 9 data_deps = [ | 10 data_deps = [ |
| 10 ":md5sum_prepare_dist($default_toolchain)", | 11 ":md5sum_prepare_dist($default_toolchain)", |
| 11 ":md5sum_copy_host($host_toolchain)", | 12 ":md5sum_bin_host($default_toolchain)", |
| 12 ] | 13 ] |
| 13 | 14 |
| 14 # TODO(cjhopman): Remove once group data_deps are fixed. | 15 # TODO(cjhopman): Remove once group data_deps are fixed. |
| 15 deps = data_deps | 16 deps = data_deps |
| 16 } | 17 } |
| 17 | 18 |
| 18 # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_device (and md5sum_bin_host) | 19 # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_device (and md5sum_bin_host) |
| 19 executable("md5sum_bin") { | 20 executable("md5sum_bin") { |
| 20 sources = [ | 21 sources = [ |
| 21 "md5sum.cc", | 22 "md5sum.cc", |
| (...skipping 13 matching lines...) Expand all Loading... |
| 35 | 36 |
| 36 # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_stripped_device_bin | 37 # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_stripped_device_bin |
| 37 create_native_executable_dist("md5sum_prepare_dist") { | 38 create_native_executable_dist("md5sum_prepare_dist") { |
| 38 dist_dir = "$root_build_dir/md5sum_dist" | 39 dist_dir = "$root_build_dir/md5sum_dist" |
| 39 binary = "$root_build_dir/md5sum_bin" | 40 binary = "$root_build_dir/md5sum_bin" |
| 40 include_main_binary = true | 41 include_main_binary = true |
| 41 deps = [ | 42 deps = [ |
| 42 ":md5sum_bin", | 43 ":md5sum_bin", |
| 43 ] | 44 ] |
| 44 } | 45 } |
| 45 } else { | 46 |
| 46 # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_host | 47 # GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_host |
| 47 action("md5sum_copy_host") { | 48 binary_symlink("md5sum_bin_host") { |
| 48 # Symlink rather than copy. When copied and using a component build, it | 49 binary_label = ":md5sum_bin($host_toolchain)" |
| 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 } | 50 } |
| 68 } | 51 } |
| OLD | NEW |