blob: 0740cab610d5fc20df24c674d353a3b0d1b77f71 [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# GYP: //tools/android/md5sum/md5sum.gyp:md5sum
group("md5sum") {
datadeps = [
":md5sum_prepare_dist($default_toolchain)",
":md5sum_copy_host($host_toolchain)",
]
# TODO(cjhopman): Remove once group datadeps are fixed.
deps = datadeps
}
# GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_device (and md5sum_bin_host)
executable("md5sum_bin") {
sources = [
"md5sum.cc",
]
deps = [
"//base",
]
# TODO(GYP)
#'conditions': [
#[ 'order_profiling!=0 and OS=="android"', {
#'dependencies': [ '../../../tools/cygprofile/cygprofile.gyp:cygprofile', ],
#}],
#],
}
if (current_toolchain == default_toolchain) {
import("//build/config/android/rules.gni")
# GYP: //tools/android/md5sum/md5sum.gyp:md5sum_stripped_device_bin
create_native_executable_dist("md5sum_prepare_dist") {
dist_dir = "$root_build_dir/md5sum_dist"
binary = "$root_build_dir/exe.stripped/md5sum_bin"
deps = [
":md5sum_bin",
]
}
} else {
# GYP: //tools/android/md5sum/md5sum.gyp:md5sum_bin_host
action("md5sum_copy_host") {
# Symlink rather than copy. When copied and using a component build, it
# fails to find libbase.so (since it's actually at clang_x64/libbase.so).
script = "//build/symlink.py"
_src = "$root_out_dir/md5sum_bin"
_target = "$root_build_dir/md5sum_bin_host"
sources = [
_src,
]
outputs = [
_target,
]
deps = [
":md5sum_bin",
]
args = [
"-f",
rebase_path(_src, root_build_dir),
rebase_path(_target, root_build_dir),
]
}
}