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/toolchain/toolchain.gni") | 5 import("//build/toolchain/toolchain.gni") |
6 import("//services/service_manager/public/constants.gni") | 6 import("//services/service_manager/public/constants.gni") |
7 | 7 |
8 if (is_android) { | 8 if (is_android) { |
9 import("//build/config/android/rules.gni") | 9 import("//build/config/android/rules.gni") |
10 import("//build/config/zip.gni") | 10 import("//build/config/zip.gni") |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 } | 46 } |
47 deps = service_deps | 47 deps = service_deps |
48 } | 48 } |
49 service_data_deps += [ ":$copy_step_name" ] | 49 service_data_deps += [ ":$copy_step_name" ] |
50 } | 50 } |
51 | 51 |
52 if (defined(invoker.data_deps)) { | 52 if (defined(invoker.data_deps)) { |
53 service_data_deps += invoker.data_deps | 53 service_data_deps += invoker.data_deps |
54 } | 54 } |
55 | 55 |
| 56 if (is_win) { |
| 57 executable_extension = "service.exe" |
| 58 } else { |
| 59 executable_extension = "service" |
| 60 } |
| 61 |
56 executable_target_name = base_target_name + "_executable" | 62 executable_target_name = base_target_name + "_executable" |
57 executable_name = base_target_name + ".service" | 63 executable_name = base_target_name + "." + executable_extension |
58 | 64 |
59 executable(executable_target_name) { | 65 executable(executable_target_name) { |
60 output_name = base_target_name | 66 output_name = base_target_name |
61 output_extension = "service" | 67 output_extension = executable_extension |
62 | 68 |
63 if (defined(invoker.cflags)) { | 69 if (defined(invoker.cflags)) { |
64 cflags = invoker.cflags | 70 cflags = invoker.cflags |
65 } | 71 } |
66 if (defined(invoker.cflags_c)) { | 72 if (defined(invoker.cflags_c)) { |
67 cflags_c = invoker.cflags_c | 73 cflags_c = invoker.cflags_c |
68 } | 74 } |
69 if (defined(invoker.cflags_cc)) { | 75 if (defined(invoker.cflags_cc)) { |
70 cflags_cc = invoker.cflags_cc | 76 cflags_cc = invoker.cflags_cc |
71 } | 77 } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 data_deps = service_data_deps | 154 data_deps = service_data_deps |
149 | 155 |
150 sources = [ | 156 sources = [ |
151 "${root_out_dir}/${executable_name}", | 157 "${root_out_dir}/${executable_name}", |
152 ] | 158 ] |
153 outputs = [ | 159 outputs = [ |
154 "${root_out_dir}/${packages_directory}/${base_target_name}/${executable_na
me}", | 160 "${root_out_dir}/${packages_directory}/${base_target_name}/${executable_na
me}", |
155 ] | 161 ] |
156 } | 162 } |
157 } | 163 } |
OLD | NEW |