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/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/config/locales.gni") | 6 import("//build/config/locales.gni") |
7 import("//build/config/ui.gni") | 7 import("//build/config/ui.gni") |
8 import("//chrome/chrome_repack_locales.gni") | 8 import("//chrome/chrome_repack_locales.gni") |
9 import("//chrome/version.gni") | 9 import("//chrome/version.gni") |
10 | 10 |
11 if (is_android) { | 11 if (is_android) { |
12 import("//build/config/android/rules.gni") | 12 import("//build/config/android/rules.gni") |
13 } | 13 } |
14 | 14 |
15 if (is_win && !link_chrome_on_windows) { | 15 if (!is_android) { |
16 # When linking is disabled on Windows, create a dummy Chrome target to | |
17 # make targets work that depend on Chrome. | |
18 group("chrome") { | |
19 } | |
20 group("main_dll") { | |
21 } | |
22 } | |
23 | |
24 if (!is_android && (!is_win || link_chrome_on_windows)) { | |
25 # TODO(GYP) for Windows need to the the reorder-imports step which probably | 16 # TODO(GYP) for Windows need to the the reorder-imports step which probably |
26 # means adding another target and renaming this to chrome_initial like in GYP. | 17 # means adding another target and renaming this to chrome_initial like in GYP. |
27 executable("chrome") { | 18 executable("chrome") { |
28 # Because the sources list varies so significantly per-platform, generally | 19 # Because the sources list varies so significantly per-platform, generally |
29 # each platform lists its own files rather than relying on filtering or | 20 # each platform lists its own files rather than relying on filtering or |
30 # removing unused files. | 21 # removing unused files. |
31 sources = [ | 22 sources = [ |
32 "app/chrome_exe_resource.h", | 23 "app/chrome_exe_resource.h", |
33 ] | 24 ] |
34 deps = [] | 25 deps = [] |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 ] | 137 ] |
147 # TODO(GYP) some stuff from GYP including chrome_multiple_dll. | 138 # TODO(GYP) some stuff from GYP including chrome_multiple_dll. |
148 } | 139 } |
149 | 140 |
150 if (is_linux && enable_plugins) { | 141 if (is_linux && enable_plugins) { |
151 deps += [ "//pdf" ] | 142 deps += [ "//pdf" ] |
152 } | 143 } |
153 } | 144 } |
154 } # !is_android | 145 } # !is_android |
155 | 146 |
156 if (!is_win || link_chrome_on_windows) { | 147 shared_library("main_dll") { |
157 shared_library("main_dll") { | 148 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
158 configs += [ "//build/config/compiler:wexit_time_destructors" ] | |
159 | 149 |
160 deps = [ | 150 deps = [ |
161 ":browser_dependencies", | 151 ":browser_dependencies", |
162 "//base/allocator", | 152 "//base/allocator", |
| 153 ] |
| 154 if (is_win) { |
| 155 output_name = "chrome" |
| 156 |
| 157 sources = [ |
| 158 "//base/win/dllmain.cc", |
| 159 "app/chrome_command_ids.h", |
| 160 "app/chrome_dll.rc", |
| 161 "app/chrome_dll_resource.h", |
| 162 "app/chrome_main.cc", |
| 163 "app/chrome_main_delegate.cc", |
| 164 "app/chrome_main_delegate.h", |
| 165 "app/close_handle_hook_win.cc", |
| 166 "app/close_handle_hook_win.h", |
| 167 "app/delay_load_hook_win.cc", |
| 168 "app/delay_load_hook_win.h", |
163 ] | 169 ] |
164 if (is_win) { | |
165 output_name = "chrome" | |
166 | 170 |
167 sources = [ | 171 deps += [ |
168 "//base/win/dllmain.cc", | 172 # On Windows, link the dependencies (libraries) that make up actual |
169 "app/chrome_command_ids.h", | 173 # Chromium functionality into this .dll. |
170 "app/chrome_dll.rc", | 174 ":chrome_version_resources", |
171 "app/chrome_dll_resource.h", | 175 "//chrome/app/theme:chrome_unscaled_resources", |
172 "app/chrome_main.cc", | 176 "//chrome_elf", |
173 "app/chrome_main_delegate.cc", | 177 "//content/app/resources", |
174 "app/chrome_main_delegate.h", | 178 "//crypto", |
175 "app/close_handle_hook_win.cc", | 179 "//net:net_resources", |
176 "app/close_handle_hook_win.h", | 180 "//third_party/wtl", |
177 "app/delay_load_hook_win.cc", | 181 "//ui/views", |
178 "app/delay_load_hook_win.h", | 182 ] |
179 ] | 183 if (enable_configuration_policy) { |
180 | 184 deps += [ "//components/policy" ] |
181 deps += [ | 185 } |
182 # On Windows, link the dependencies (libraries) that make up actual | 186 if (current_cpu == "x86") { |
183 # Chromium functionality into this .dll. | 187 # Add a dependency to custom import library for user32 delay imports only |
184 ":chrome_version_resources", | 188 # in x86 builds. |
185 "//chrome/app/theme:chrome_unscaled_resources", | 189 #deps += [ 'chrome_user32_delay_imports' ] TODO(GYP) |
186 "//chrome_elf", | |
187 "//content/app/resources", | |
188 "//crypto", | |
189 "//net:net_resources", | |
190 "//third_party/wtl", | |
191 "//ui/views", | |
192 ] | |
193 if (enable_configuration_policy) { | |
194 deps += [ "//components/policy" ] | |
195 } | |
196 if (current_cpu == "x86") { | |
197 # Add a dependency to custom import library for user32 delay imports onl
y | |
198 # in x86 builds. | |
199 #deps += [ 'chrome_user32_delay_imports' ] TODO(GYP) | |
200 } | |
201 | |
202 # TODO(GYP) incremental linking flags in debug builds | |
203 #'LinkIncremental': '<(msvs_large_module_debug_link_mode)', | |
204 | |
205 # TODO(GYP) Lots of VCLinkerTool stuff on Windows. | |
206 | |
207 # TODO(GYP) chrome_pgo_phase on Windows. | |
208 } | 190 } |
209 | 191 |
210 if (use_aura) { | 192 # TODO(GYP) incremental linking flags in debug builds |
211 deps += [ "//ui/compositor" ] | 193 #'LinkIncremental': '<(msvs_large_module_debug_link_mode)', |
212 } | |
213 | 194 |
214 #TODO(GYP) add chrome_multiple_dll support | 195 # TODO(GYP) Lots of VCLinkerTool stuff on Windows. |
215 if (false) { #chrome_multiple_dll) { | |
216 defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ] | |
217 deps += [ "//content/public/app:browser" ] | |
218 } else { | |
219 deps += [ | |
220 ":child_dependencies", | |
221 "//content/public/app:both", | |
222 ] | |
223 } | |
224 | 196 |
225 if (cld_version == 0 || cld_version == 2) { | 197 # TODO(GYP) chrome_pgo_phase on Windows. |
226 deps += [ "//third_party/cld_2" ] | 198 } |
227 } | |
228 | 199 |
229 if (is_mac) { | 200 if (use_aura) { |
230 #['OS=="mac" and component!="shared_library"', { TODO(GYP) | 201 deps += [ "//ui/compositor" ] |
231 # 'includes': [ 'chrome_dll_bundle.gypi' ], | 202 } |
232 #}], | |
233 # TODO(GYP) Lots of other stuff in the OS=="mac" block. | |
234 } | |
235 | 203 |
236 if (enable_plugins) { | 204 #TODO(GYP) add chrome_multiple_dll support |
237 deps += [ "//pdf" ] | 205 if (false) { #chrome_multiple_dll) { |
238 } | 206 defines = [ "CHROME_MULTIPLE_DLL_BROWSER" ] |
| 207 deps += [ "//content/public/app:browser" ] |
| 208 } else { |
| 209 deps += [ |
| 210 ":child_dependencies", |
| 211 "//content/public/app:both", |
| 212 ] |
| 213 } |
| 214 |
| 215 if (cld_version == 0 || cld_version == 2) { |
| 216 deps += [ "//third_party/cld_2" ] |
| 217 } |
| 218 |
| 219 if (is_mac) { |
| 220 #['OS=="mac" and component!="shared_library"', { TODO(GYP) |
| 221 # 'includes': [ 'chrome_dll_bundle.gypi' ], |
| 222 #}], |
| 223 # TODO(GYP) Lots of other stuff in the OS=="mac" block. |
| 224 } |
| 225 |
| 226 if (enable_plugins) { |
| 227 deps += [ "//pdf" ] |
239 } | 228 } |
240 } | 229 } |
241 | 230 |
242 # GYP version: chromium_browser_dependencies variable in chrome.gyp | 231 # GYP version: chromium_browser_dependencies variable in chrome.gyp |
243 group("browser_dependencies") { | 232 group("browser_dependencies") { |
244 deps = [ | 233 deps = [ |
245 "//chrome/browser", | 234 "//chrome/browser", |
246 "//chrome/common", | 235 "//chrome/common", |
247 "//sync", | 236 "//sync", |
248 ] | 237 ] |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 | 722 |
734 args = [ | 723 args = [ |
735 rebase_path(infile, root_build_dir), | 724 rebase_path(infile, root_build_dir), |
736 rebase_path(outfile, root_build_dir), | 725 rebase_path(outfile, root_build_dir), |
737 "-e s/@@NAME@@/$name/", | 726 "-e s/@@NAME@@/$name/", |
738 "-e s/@@FILENAME@@/$filename/", | 727 "-e s/@@FILENAME@@/$filename/", |
739 "-e s/@@CONFDIR@@/$confdir/", | 728 "-e s/@@CONFDIR@@/$confdir/", |
740 ] | 729 ] |
741 } | 730 } |
742 } | 731 } |
OLD | NEW |