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") |
| 6 |
5 # GYP: //tools/android/forwarder2/forwarder.gyp:forwarder2 | 7 # GYP: //tools/android/forwarder2/forwarder.gyp:forwarder2 |
6 group("forwarder2") { | 8 group("forwarder2") { |
7 data_deps = [ | 9 data_deps = [ |
8 ":host_forwarder_copy($host_toolchain)", | 10 ":host_forwarder", |
9 ":device_forwarder_prepare_dist($default_toolchain)", | 11 ":device_forwarder_prepare_dist($default_toolchain)", |
10 ] | 12 ] |
11 } | 13 } |
12 | 14 |
13 if (current_toolchain == default_toolchain) { | 15 if (current_toolchain == default_toolchain) { |
14 import("//build/config/android/rules.gni") | 16 import("//build/config/android/rules.gni") |
15 | 17 |
16 # GYP: //tools/android/forwarder2/forwarder.gyp:device_forwarder | 18 # GYP: //tools/android/forwarder2/forwarder.gyp:device_forwarder |
17 executable("device_forwarder") { | 19 executable("device_forwarder") { |
18 sources = [ | 20 sources = [ |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 "socket.cc", | 84 "socket.cc", |
83 "socket.h", | 85 "socket.h", |
84 "util.h", | 86 "util.h", |
85 ] | 87 ] |
86 deps = [ | 88 deps = [ |
87 "//base", | 89 "//base", |
88 "//build/config/sanitizers:deps", | 90 "//build/config/sanitizers:deps", |
89 "//tools/android/common", | 91 "//tools/android/common", |
90 ] | 92 ] |
91 } | 93 } |
92 | 94 } else { |
93 # GYP: //tools/android/forwarder2/forwarder.gyp:forwarder2 | 95 # Create a symlink from root_build_dir -> clang_x64/host_forwarder. |
94 action("host_forwarder_copy") { | 96 binary_symlink("host_forwarder") { |
95 # Symlink rather than copy. When copied and using a component build, it | 97 binary_label = ":host_forwarder($host_toolchain)" |
96 # fails to find libbase.so (since it's actually at clang_x64/libbase.so). | |
97 script = "//build/symlink.py" | |
98 _src = "$root_out_dir/host_forwarder" | |
99 _target = "$root_build_dir/host_forwarder" | |
100 sources = [ | |
101 _src, | |
102 ] | |
103 outputs = [ | |
104 _target, | |
105 ] | |
106 deps = [ | |
107 ":host_forwarder", | |
108 ] | |
109 args = [ | |
110 "-f", | |
111 rebase_path(_src, root_build_dir), | |
112 rebase_path(_target, root_build_dir), | |
113 ] | |
114 } | 98 } |
115 } | 99 } |
OLD | NEW |