Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: chrome/BUILD.gn

Issue 1123433002: Add a GN flag for the Windows multi-dll build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/secondary/tools/grit/grit_rule.gni ('k') | chrome/app/resources/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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",
46 "app/client_util.cc", 46 "app/client_util.cc",
47 "app/client_util.h", 47 "app/client_util.h",
48 "app/kasko_client.cc", 48 "app/kasko_client.cc",
49 "app/kasko_client.h", 49 "app/kasko_client.h",
50 "app/signature_validator_win.cc", 50 "app/signature_validator_win.cc",
51 "app/signature_validator_win.h", 51 "app/signature_validator_win.h",
52 "common/crash_keys.cc", 52 "common/crash_keys.cc",
53 "common/crash_keys.h'", 53 "common/crash_keys.h'",
54 ] 54 ]
55 55
56 if (is_component_build) { 56 if (is_component_build) {
57 # This is necessary to make content_switches compile without DLL 57 # This is necessary to make content_switches compile without DLL
58 # linkage errors in a component build. 58 # linkage errors in a component build.
59 defines += [ "COMPILE_CONTENT_STATICALLY" ] 59 defines += [ "COMPILE_CONTENT_STATICALLY" ]
60 } 60 }
61 61
62 deps += [ 62 deps += [
63 ":chrome_version_resources", 63 ":chrome_exe_version",
64 ":image_pre_reader", 64 ":image_pre_reader",
65 ":main_dll", 65 ":main_dll",
66 66
67 # 'chrome_nacl_win64" TODO(GYP) 67 # 'chrome_nacl_win64" TODO(GYP)
68 # '../win8/delegate_execute/delegate_execute.gyp:*', TODO(GYP) 68 # '../win8/delegate_execute/delegate_execute.gyp:*', TODO(GYP)
69 # '../win8/metro_driver/metro_driver.gyp:metro_driver', TODO(GYP) 69 # '../win8/metro_driver/metro_driver.gyp:metro_driver', TODO(GYP)
70 "//base", 70 "//base",
71 "//breakpad:breakpad_handler", 71 "//breakpad:breakpad_handler",
72 "//breakpad:breakpad_sender", 72 "//breakpad:breakpad_sender",
73 "//chrome/browser:chrome_process_finder", 73 "//chrome/browser:chrome_process_finder",
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
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",
169 "//base/win/dllmain.cc", 173 "//base/win/dllmain.cc",
170 "app/chrome_command_ids.h", 174 "app/chrome_command_ids.h",
171 "app/chrome_dll.rc", 175 "app/chrome_dll.rc",
172 "app/chrome_dll_resource.h", 176 "app/chrome_dll_resource.h",
173 "app/chrome_main.cc", 177 "app/chrome_main.cc",
174 "app/chrome_main_delegate.cc", 178 "app/chrome_main_delegate.cc",
175 "app/chrome_main_delegate.h", 179 "app/chrome_main_delegate.h",
176 "app/close_handle_hook_win.cc", 180 "app/close_handle_hook_win.cc",
177 "app/close_handle_hook_win.h", 181 "app/close_handle_hook_win.h",
178 "app/delay_load_hook_win.cc", 182 "app/delay_load_hook_win.cc",
179 "app/delay_load_hook_win.h", 183 "app/delay_load_hook_win.h",
180 ] 184 ]
181 185
182 deps += [ 186 deps += [
183 # On Windows, link the dependencies (libraries) that make up actual 187 ":chrome_dll_version",
184 # Chromium functionality into this .dll.
185 ":chrome_version_resources",
186 "//base/trace_event/etw_manifest:chrome_events_win", 188 "//base/trace_event/etw_manifest:chrome_events_win",
187 "//chrome/app/theme:chrome_unscaled_resources", 189 "//chrome/app/theme:chrome_unscaled_resources",
188 "//chrome_elf", 190 "//chrome_elf",
189 "//content/app/resources", 191 "//content/app/resources",
190 "//crypto", 192 "//crypto",
191 "//net:net_resources", 193 "//net:net_resources",
192 "//third_party/wtl", 194 "//third_party/wtl",
193 "//ui/views", 195 "//ui/views",
194 ] 196 ]
195 if (enable_configuration_policy) { 197 if (enable_configuration_policy) {
(...skipping 11 matching lines...) Expand all
207 209
208 # TODO(GYP) Lots of VCLinkerTool stuff on Windows. 210 # TODO(GYP) Lots of VCLinkerTool stuff on Windows.
209 211
210 # TODO(GYP) chrome_pgo_phase on Windows. 212 # TODO(GYP) chrome_pgo_phase on Windows.
211 } 213 }
212 214
213 if (use_aura) { 215 if (use_aura) {
214 deps += [ "//ui/compositor" ] 216 deps += [ "//ui/compositor" ]
215 } 217 }
216 218
217 #TODO(GYP) add chrome_multiple_dll support 219 if (is_multi_dll_chrome) {
218 if (false) { #chrome_multiple_dll) {
219 defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ] 220 defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ]
220 deps += [ "//content/public/app:browser" ] 221 deps += [ "//content/public/app:browser" ]
221 } else { 222 } else {
222 deps += [ 223 deps += [
223 ":child_dependencies", 224 ":child_dependencies",
224 "//content/public/app:both", 225 "//content/public/app:both",
225 ] 226 ]
226 } 227 }
227 228
228 if (cld_version == 0 || cld_version == 2) { 229 if (cld_version == 0 || cld_version == 2) {
229 deps += [ "//third_party/cld_2" ] 230 deps += [ "//third_party/cld_2" ]
230 } 231 }
231 232
232 if (is_mac) { 233 if (is_mac) {
233 #['OS=="mac" and component!="shared_library"', { TODO(GYP) 234 #['OS=="mac" and component!="shared_library"', { TODO(GYP)
234 # 'includes': [ 'chrome_dll_bundle.gypi' ], 235 # 'includes': [ 'chrome_dll_bundle.gypi' ],
235 #}], 236 #}],
236 # TODO(GYP) Lots of other stuff in the OS=="mac" block. 237 # TODO(GYP) Lots of other stuff in the OS=="mac" block.
237 } 238 }
238 239
239 if (enable_plugins) { 240 if (enable_plugins && !is_multi_dll_chrome) {
240 deps += [ "//pdf" ] 241 deps += [ "//pdf" ]
241 } 242 }
242 } 243 }
243 244
245 if (is_multi_dll_chrome) {
246 shared_library("chrome_child") {
247 sources = [
248 "app/chrome_main.cc",
249 "app/chrome_main_delegate.cc",
250 "app/chrome_main_delegate.h",
251 "app/close_handle_hook_win.cc",
252 "app/close_handle_hook_win.h",
253 ]
254
255 configs += [ "//build/config/compiler:wexit_time_destructors" ]
256 defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
257
258 deps = [
259 ":child_dependencies",
260 ":chrome_dll_version",
261 "//chrome/browser/policy:path_parser",
262 "//content/public/app:child",
263 ]
264
265 if (is_win) {
266 deps += [ "//chrome_elf" ]
267 # TODO(GYP): PGO on Windows.
268 # ['chrome_pgo_phase==1', {
269 # 'msvs_settings': {
270 # 'VCLinkerTool': {
271 # 'LinkTimeCodeGeneration': '2',
272 # },
273 # },
274 # }],
275 # ['chrome_pgo_phase==2', {
276 # 'msvs_settings': {
277 # 'VCLinkerTool': {
278 # 'LinkTimeCodeGeneration': '3',
279 # },
280 # },
281 # }],
282 }
283 if (enable_plugins) {
284 deps += [ "//pdf" ]
285 }
286 }
287 }
288
244 # GYP version: chromium_browser_dependencies variable in chrome.gyp 289 # GYP version: chromium_browser_dependencies variable in chrome.gyp
245 group("browser_dependencies") { 290 group("browser_dependencies") {
246 deps = [ 291 deps = [
247 "//chrome/browser", 292 "//chrome/browser",
248 "//chrome/common", 293 "//chrome/common",
249 "//sync", 294 "//sync",
250 ] 295 ]
251 if (!is_ios) { 296 if (!is_ios) {
252 deps += [ "//ppapi/host" ] 297 deps += [ "//ppapi/host" ]
253 } 298 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 output = "$target_gen_dir/nacl64_exe_version.rc" 372 output = "$target_gen_dir/nacl64_exe_version.rc"
328 } 373 }
329 374
330 process_version("other_version") { 375 process_version("other_version") {
331 sources = [ 376 sources = [
332 "app/other.ver", 377 "app/other.ver",
333 ] 378 ]
334 output = "$target_gen_dir/other_version.rc" 379 output = "$target_gen_dir/other_version.rc"
335 } 380 }
336 381
337 group("chrome_version_resources") {
338 deps = [
339 ":chrome_exe_version",
340 ":chrome_dll_version",
341 ":nacl64_exe_version",
342 ":other_version",
343 ]
344 }
345
346 source_set("image_pre_reader") { 382 source_set("image_pre_reader") {
347 sources = [ 383 sources = [
348 "app/image_pre_reader_win.cc", 384 "app/image_pre_reader_win.cc",
349 "app/image_pre_reader_win.h", 385 "app/image_pre_reader_win.h",
350 ] 386 ]
351 deps = [ 387 deps = [
352 "//base", 388 "//base",
353 ] 389 ]
354 } 390 }
355 } 391 }
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 780
745 args = [ 781 args = [
746 rebase_path(infile, root_build_dir), 782 rebase_path(infile, root_build_dir),
747 rebase_path(outfile, root_build_dir), 783 rebase_path(outfile, root_build_dir),
748 "-e s/@@NAME@@/$name/", 784 "-e s/@@NAME@@/$name/",
749 "-e s/@@FILENAME@@/$filename/", 785 "-e s/@@FILENAME@@/$filename/",
750 "-e s/@@CONFDIR@@/$confdir/", 786 "-e s/@@CONFDIR@@/$confdir/",
751 ] 787 ]
752 } 788 }
753 } 789 }
OLDNEW
« no previous file with comments | « build/secondary/tools/grit/grit_rule.gni ('k') | chrome/app/resources/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698