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/chrome_build.gni") |
5 import("//build/config/features.gni") | 6 import("//build/config/features.gni") |
6 import("//build/config/locales.gni") | 7 import("//build/config/locales.gni") |
7 import("//build/config/ui.gni") | 8 import("//build/config/ui.gni") |
8 import("//chrome/chrome_repack_locales.gni") | 9 import("//chrome/chrome_repack_locales.gni") |
9 import("//chrome/version.gni") | 10 import("//chrome/version.gni") |
10 | 11 |
11 if (is_android) { | 12 if (is_android) { |
12 import("//build/config/android/rules.gni") | 13 import("//build/config/android/rules.gni") |
13 } | 14 } |
14 | 15 |
15 if (!is_android) { | 16 if (!is_android) { |
16 # TODO(GYP) for Windows need to the the reorder-imports step which probably | 17 # TODO(GYP) for Windows need to the the reorder-imports step which probably |
17 # means adding another target and renaming this to chrome_initial like in GYP. | 18 # means adding another target and renaming this to chrome_initial like in GYP. |
18 executable("chrome") { | 19 executable("chrome") { |
19 # Because the sources list varies so significantly per-platform, generally | 20 # Because the sources list varies so significantly per-platform, generally |
20 # each platform lists its own files rather than relying on filtering or | 21 # each platform lists its own files rather than relying on filtering or |
21 # removing unused files. | 22 # removing unused files. |
22 sources = [ | 23 sources = [ |
23 "app/chrome_exe_resource.h", | 24 "app/chrome_exe_resource.h", |
24 ] | 25 ] |
25 defines = [] | 26 defines = [] |
26 deps = [] | 27 deps = [] |
27 datadeps = [] | 28 data_deps = [] |
28 | 29 |
29 # TODO(GYP) mac_bundle_resources, xcode_settings | 30 # TODO(GYP) mac_bundle_resources, xcode_settings |
30 | 31 |
31 # TODO(GYP) order_profiling, order_text_section | 32 # TODO(GYP) order_profiling, order_text_section |
32 | 33 |
33 if (is_win) { | 34 if (is_win) { |
34 sources += [ | 35 sources += [ |
35 "$target_gen_dir/chrome_exe_version.rc", | |
36 "//content/app/startup_helper_win.cc", | 36 "//content/app/startup_helper_win.cc", |
37 "//content/public/common/content_switches.cc", | 37 "//content/public/common/content_switches.cc", |
38 "app/chrome_crash_reporter_client.cc", | 38 "app/chrome_crash_reporter_client.cc", |
39 "app/chrome_crash_reporter_client.h", | 39 "app/chrome_crash_reporter_client.h", |
40 "app/chrome_exe.rc", | 40 "app/chrome_exe.rc", |
41 "app/chrome_exe_main_win.cc", | 41 "app/chrome_exe_main_win.cc", |
42 "app/chrome_watcher_client_win.cc", | 42 "app/chrome_watcher_client_win.cc", |
43 "app/chrome_watcher_client_win.h", | 43 "app/chrome_watcher_client_win.h", |
44 "app/chrome_watcher_command_line_win.cc", | 44 "app/chrome_watcher_command_line_win.cc", |
45 "app/chrome_watcher_command_line_win.h", | 45 "app/chrome_watcher_command_line_win.h", |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 ":packed_extra_resources", | 138 ":packed_extra_resources", |
139 ":packed_resources", | 139 ":packed_resources", |
140 "//components/startup_metric_utils", | 140 "//components/startup_metric_utils", |
141 | 141 |
142 # Precompiled plugins that need to get copied to the output directory. | 142 # Precompiled plugins that need to get copied to the output directory. |
143 # On Mac, internal plugins go inside the framework, so these | 143 # On Mac, internal plugins go inside the framework, so these |
144 # dependencies are on chrome.dll. | 144 # dependencies are on chrome.dll. |
145 "//third_party/adobe/flash:flapper_binaries", | 145 "//third_party/adobe/flash:flapper_binaries", |
146 "//third_party/widevine/cdm:widevinecdmadapter", | 146 "//third_party/widevine/cdm:widevinecdmadapter", |
147 ] | 147 ] |
148 # TODO(GYP) some stuff from GYP including chrome_multiple_dll. | |
149 } | 148 } |
150 | 149 |
151 if (is_linux && enable_plugins) { | 150 if (is_linux && enable_plugins) { |
152 deps += [ "//pdf" ] | 151 deps += [ "//pdf" ] |
153 } | 152 } |
| 153 |
| 154 if (is_multi_dll_chrome) { |
| 155 defines += [ "CHROME_MULTIPLE_DLL" ] |
| 156 data_deps += [ ":chrome_child" ] |
| 157 } |
154 } | 158 } |
155 } # !is_android | 159 } # !is_android |
156 | 160 |
157 shared_library("main_dll") { | 161 shared_library("main_dll") { |
158 configs += [ "//build/config/compiler:wexit_time_destructors" ] | 162 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| 163 defines = [] |
159 | 164 |
160 deps = [ | 165 deps = [ |
161 ":browser_dependencies", | 166 ":browser_dependencies", |
162 "//base/allocator", | 167 "//base/allocator", |
163 ] | 168 ] |
164 if (is_win) { | 169 if (is_win) { |
165 output_name = "chrome" | 170 output_name = "chrome" |
166 | 171 |
167 sources = [ | 172 sources = [ |
168 "$root_gen_dir/base/trace_event/etw_manifest/chrome_events_win.rc", | 173 "$root_gen_dir/base/trace_event/etw_manifest/chrome_events_win.rc", |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 212 |
208 # TODO(GYP) Lots of VCLinkerTool stuff on Windows. | 213 # TODO(GYP) Lots of VCLinkerTool stuff on Windows. |
209 | 214 |
210 # TODO(GYP) chrome_pgo_phase on Windows. | 215 # TODO(GYP) chrome_pgo_phase on Windows. |
211 } | 216 } |
212 | 217 |
213 if (use_aura) { | 218 if (use_aura) { |
214 deps += [ "//ui/compositor" ] | 219 deps += [ "//ui/compositor" ] |
215 } | 220 } |
216 | 221 |
217 #TODO(GYP) add chrome_multiple_dll support | 222 if (is_multi_dll_chrome) { |
218 if (false) { #chrome_multiple_dll) { | |
219 defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ] | 223 defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ] |
220 deps += [ "//content/public/app:browser" ] | 224 deps += [ "//content/public/app:browser" ] |
221 } else { | 225 } else { |
222 deps += [ | 226 deps += [ |
223 ":child_dependencies", | 227 ":child_dependencies", |
224 "//content/public/app:both", | 228 "//content/public/app:both", |
225 ] | 229 ] |
226 } | 230 } |
227 | 231 |
228 if (cld_version == 0 || cld_version == 2) { | 232 if (cld_version == 0 || cld_version == 2) { |
229 deps += [ "//third_party/cld_2" ] | 233 deps += [ "//third_party/cld_2" ] |
230 } | 234 } |
231 | 235 |
232 if (is_mac) { | 236 if (is_mac) { |
233 #['OS=="mac" and component!="shared_library"', { TODO(GYP) | 237 #['OS=="mac" and component!="shared_library"', { TODO(GYP) |
234 # 'includes': [ 'chrome_dll_bundle.gypi' ], | 238 # 'includes': [ 'chrome_dll_bundle.gypi' ], |
235 #}], | 239 #}], |
236 # TODO(GYP) Lots of other stuff in the OS=="mac" block. | 240 # TODO(GYP) Lots of other stuff in the OS=="mac" block. |
237 } | 241 } |
238 | 242 |
239 if (enable_plugins) { | 243 if (enable_plugins && !is_multi_dll_chrome) { |
240 deps += [ "//pdf" ] | 244 deps += [ "//pdf" ] |
241 } | 245 } |
242 } | 246 } |
243 | 247 |
| 248 if (is_multi_dll_chrome) { |
| 249 shared_library("chrome_child") { |
| 250 sources = [ |
| 251 "app/chrome_main.cc", |
| 252 "app/chrome_main_delegate.cc", |
| 253 "app/chrome_main_delegate.h", |
| 254 "app/close_handle_hook_win.cc", |
| 255 "app/close_handle_hook_win.h", |
| 256 ] |
| 257 |
| 258 configs += [ "//build/config/compiler:wexit_time_destructors" ] |
| 259 defines = [ "CHROME_MULTIPLE_DLL_CHILD" ] |
| 260 |
| 261 deps = [ |
| 262 ":child_dependencies", |
| 263 ":chrome_dll_version", |
| 264 "//chrome/browser/policy:path_parser", |
| 265 "//content/public/app:child", |
| 266 ] |
| 267 |
| 268 if (is_win) { |
| 269 deps += [ "//chrome_elf" ] |
| 270 # TODO(GYP): PGO on Windows. |
| 271 # ['chrome_pgo_phase==1', { |
| 272 # 'msvs_settings': { |
| 273 # 'VCLinkerTool': { |
| 274 # 'LinkTimeCodeGeneration': '2', |
| 275 # }, |
| 276 # }, |
| 277 # }], |
| 278 # ['chrome_pgo_phase==2', { |
| 279 # 'msvs_settings': { |
| 280 # 'VCLinkerTool': { |
| 281 # 'LinkTimeCodeGeneration': '3', |
| 282 # }, |
| 283 # }, |
| 284 # }], |
| 285 } |
| 286 if (enable_plugins) { |
| 287 deps += [ "//pdf" ] |
| 288 } |
| 289 } |
| 290 } |
| 291 |
244 # GYP version: chromium_browser_dependencies variable in chrome.gyp | 292 # GYP version: chromium_browser_dependencies variable in chrome.gyp |
245 group("browser_dependencies") { | 293 group("browser_dependencies") { |
246 deps = [ | 294 deps = [ |
247 "//chrome/browser", | 295 "//chrome/browser", |
248 "//chrome/common", | 296 "//chrome/common", |
249 "//sync", | 297 "//sync", |
250 ] | 298 ] |
251 if (!is_ios) { | 299 if (!is_ios) { |
252 deps += [ "//ppapi/host" ] | 300 deps += [ "//ppapi/host" ] |
253 } | 301 } |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 | 792 |
745 args = [ | 793 args = [ |
746 rebase_path(infile, root_build_dir), | 794 rebase_path(infile, root_build_dir), |
747 rebase_path(outfile, root_build_dir), | 795 rebase_path(outfile, root_build_dir), |
748 "-e s/@@NAME@@/$name/", | 796 "-e s/@@NAME@@/$name/", |
749 "-e s/@@FILENAME@@/$filename/", | 797 "-e s/@@FILENAME@@/$filename/", |
750 "-e s/@@CONFDIR@@/$confdir/", | 798 "-e s/@@CONFDIR@@/$confdir/", |
751 ] | 799 ] |
752 } | 800 } |
753 } | 801 } |
OLD | NEW |