| 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/symlink.gni") | 5 import("//build/symlink.gni") |
| 6 import("//testing/test.gni") |
| 6 | 7 |
| 7 group("forwarder2") { | 8 group("forwarder2") { |
| 9 testonly = true |
| 8 data_deps = [ | 10 data_deps = [ |
| 9 ":host_forwarder", | 11 ":host_forwarder", |
| 12 ":host_forwarder_unittests", |
| 10 ":device_forwarder_prepare_dist($default_toolchain)", | 13 ":device_forwarder_prepare_dist($default_toolchain)", |
| 11 ] | 14 ] |
| 12 } | 15 } |
| 13 | 16 |
| 14 if (current_toolchain == default_toolchain) { | 17 if (current_toolchain == default_toolchain) { |
| 15 import("//build/config/android/rules.gni") | 18 import("//build/config/android/rules.gni") |
| 16 | 19 |
| 17 executable("device_forwarder") { | 20 executable("device_forwarder") { |
| 18 sources = [ | 21 sources = [ |
| 19 "command.cc", | 22 "command.cc", |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 create_native_executable_dist("device_forwarder_prepare_dist") { | 54 create_native_executable_dist("device_forwarder_prepare_dist") { |
| 52 dist_dir = "$root_build_dir/forwarder_dist" | 55 dist_dir = "$root_build_dir/forwarder_dist" |
| 53 binary = "$root_build_dir/device_forwarder" | 56 binary = "$root_build_dir/device_forwarder" |
| 54 deps = [ | 57 deps = [ |
| 55 ":device_forwarder", | 58 ":device_forwarder", |
| 56 ] | 59 ] |
| 57 } | 60 } |
| 58 } | 61 } |
| 59 | 62 |
| 60 if (current_toolchain != default_toolchain) { | 63 if (current_toolchain != default_toolchain) { |
| 61 executable("host_forwarder") { | 64 source_set("host_forwarder_source_set") { |
| 62 sources = [ | 65 sources = [ |
| 63 "command.cc", | 66 "command.cc", |
| 64 "command.h", | 67 "command.h", |
| 65 "common.cc", | 68 "common.cc", |
| 66 "common.h", | 69 "common.h", |
| 67 "daemon.cc", | 70 "daemon.cc", |
| 68 "daemon.h", | 71 "daemon.h", |
| 69 "forwarder.cc", | 72 "forwarder.cc", |
| 70 "forwarder.h", | 73 "forwarder.h", |
| 71 "forwarders_manager.cc", | 74 "forwarders_manager.cc", |
| 72 "forwarders_manager.h", | 75 "forwarders_manager.h", |
| 73 "host_controller.cc", | 76 "host_controller.cc", |
| 74 "host_controller.h", | 77 "host_controller.h", |
| 75 "host_forwarder_main.cc", | 78 "host_controllers_manager.cc", |
| 79 "host_controllers_manager.h", |
| 76 "pipe_notifier.cc", | 80 "pipe_notifier.cc", |
| 77 "pipe_notifier.h", | 81 "pipe_notifier.h", |
| 78 "self_deleter_helper.h", | 82 "self_deleter_helper.h", |
| 79 "socket.cc", | 83 "socket.cc", |
| 80 "socket.h", | 84 "socket.h", |
| 81 "util.h", | 85 "util.h", |
| 82 ] | 86 ] |
| 83 deps = [ | 87 deps = [ |
| 84 "//base", | 88 "//base", |
| 85 "//build/config/sanitizers:deps", | 89 "//build/config/sanitizers:deps", |
| 86 "//tools/android/common", | 90 "//tools/android/common", |
| 87 ] | 91 ] |
| 88 } | 92 } |
| 93 |
| 94 executable("host_forwarder") { |
| 95 sources = [ |
| 96 "host_forwarder_main.cc", |
| 97 ] |
| 98 deps = [ |
| 99 ":host_forwarder_source_set", |
| 100 "//base", |
| 101 ] |
| 102 } |
| 103 |
| 104 test("host_forwarder_unittests") { |
| 105 testonly = true |
| 106 sources = [ |
| 107 "host_controllers_manager_unittest.cc", |
| 108 ] |
| 109 deps = [ |
| 110 ":host_forwarder_source_set", |
| 111 "//base", |
| 112 "//testing/gtest", |
| 113 "//testing/gtest:gtest_main", |
| 114 ] |
| 115 } |
| 89 } else { | 116 } else { |
| 90 # Create a symlink from root_build_dir -> clang_x64/host_forwarder. | 117 # Create a symlink from root_build_dir -> clang_x64/host_forwarder. |
| 91 binary_symlink("host_forwarder") { | 118 binary_symlink("host_forwarder") { |
| 92 binary_label = ":$target_name($host_toolchain)" | 119 binary_label = ":$target_name($host_toolchain)" |
| 93 } | 120 } |
| 121 binary_symlink("host_forwarder_unittests") { |
| 122 testonly = true |
| 123 binary_label = ":$target_name($host_toolchain)" |
| 124 } |
| 94 } | 125 } |
| OLD | NEW |