123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- # 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.
- import("//build/symlink.gni")
- import("//testing/test.gni")
- group("forwarder2") {
- testonly = true
- data_deps = [
- ":device_forwarder_prepare_dist($default_toolchain)",
- ":host_forwarder",
- ":host_forwarder_unittests",
- ]
- }
- if (current_toolchain == default_toolchain) {
- import("//build/config/android/rules.gni")
- executable("device_forwarder") {
- sources = [
- "command.cc",
- "command.h",
- "common.cc",
- "common.h",
- "daemon.cc",
- "daemon.h",
- "device_controller.cc",
- "device_controller.h",
- "device_forwarder_main.cc",
- "device_listener.cc",
- "device_listener.h",
- "forwarder.cc",
- "forwarder.h",
- "forwarders_manager.cc",
- "forwarders_manager.h",
- "pipe_notifier.cc",
- "pipe_notifier.h",
- "self_deleter_helper.h",
- "socket.cc",
- "socket.h",
- "util.h",
- ]
- deps = [
- "//base",
- "//tools/android/common",
- ]
- data_deps = [ "//build/android/pylib/device/commands" ]
- }
- create_native_executable_dist("device_forwarder_prepare_dist") {
- dist_dir = "$root_build_dir/forwarder_dist"
- binary = "$root_build_dir/device_forwarder"
- deps = [ ":device_forwarder" ]
- }
- }
- if (current_toolchain != default_toolchain) {
- source_set("host_forwarder_source_set") {
- sources = [
- "command.cc",
- "command.h",
- "common.cc",
- "common.h",
- "daemon.cc",
- "daemon.h",
- "forwarder.cc",
- "forwarder.h",
- "forwarders_manager.cc",
- "forwarders_manager.h",
- "host_controller.cc",
- "host_controller.h",
- "host_controllers_manager.cc",
- "host_controllers_manager.h",
- "pipe_notifier.cc",
- "pipe_notifier.h",
- "self_deleter_helper.h",
- "socket.cc",
- "socket.h",
- "util.h",
- ]
- deps = [
- "//base",
- "//tools/android/common",
- ]
- }
- executable("host_forwarder") {
- sources = [ "host_forwarder_main.cc" ]
- deps = [
- ":host_forwarder_source_set",
- "//base",
- ]
- }
- test("host_forwarder_unittests") {
- testonly = true
- sources = [ "host_controllers_manager_unittest.cc" ]
- deps = [
- ":host_forwarder_source_set",
- "//base",
- "//testing/gtest",
- "//testing/gtest:gtest_main",
- ]
- }
- } else {
- # Create a symlink from root_build_dir -> clang_x64/host_forwarder.
- binary_symlink("host_forwarder") {
- binary_label = ":$target_name($host_toolchain)"
- }
- binary_symlink("host_forwarder_unittests") {
- testonly = true
- binary_label = ":$target_name($host_toolchain)"
- }
- }
|