OLD | NEW |
| (Empty) |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 { | |
6 'targets': [ | |
7 { | |
8 # GN version: //components/crash/core/browser | |
9 'target_name': 'crash_core_browser', | |
10 'type': 'static_library', | |
11 'include_dirs': [ | |
12 '..', | |
13 ], | |
14 'dependencies': [ | |
15 'upload_list', | |
16 '../base/base.gyp:base', | |
17 '../components/components_strings.gyp:components_strings', | |
18 ], | |
19 'sources': [ | |
20 'crash/core/browser/crashes_ui_util.cc', | |
21 'crash/core/browser/crashes_ui_util.h', | |
22 ], | |
23 }, | |
24 { | |
25 # GN version: //components/crash/core/common | |
26 'target_name': 'crash_core_common', | |
27 'type': 'static_library', | |
28 'include_dirs': [ | |
29 '..', | |
30 ], | |
31 'dependencies': [ | |
32 # List of dependencies is intentionally very minimal. Please avoid | |
33 # adding extra dependencies without first checking with OWNERS. | |
34 '../base/base.gyp:base', | |
35 ], | |
36 'sources': [ | |
37 'crash/core/common/crash_keys.cc', | |
38 'crash/core/common/crash_keys.h', | |
39 ], | |
40 'conditions': [ | |
41 ['OS=="mac" or OS=="ios"', { | |
42 'sources': [ | |
43 'crash/core/common/objc_zombie.h', | |
44 'crash/core/common/objc_zombie.mm', | |
45 ], | |
46 }], | |
47 ], | |
48 }, | |
49 ], | |
50 'conditions': [ | |
51 ['OS=="win" and target_arch=="ia32"', { | |
52 'targets': [ | |
53 { | |
54 'target_name': 'crash_core_common_win64', | |
55 'type': 'static_library', | |
56 'include_dirs': [ | |
57 '..', | |
58 ], | |
59 'dependencies': [ | |
60 # List of dependencies is intentionally very minimal. Please avoid | |
61 # adding extra dependencies without first checking with OWNERS. | |
62 '../base/base.gyp:base_win64', | |
63 ], | |
64 'sources': [ | |
65 'crash/core/common/crash_keys.cc', | |
66 'crash/core/common/crash_keys.h', | |
67 ], | |
68 'configurations': { | |
69 'Common_Base': { | |
70 'msvs_target_platform': 'x64', | |
71 }, | |
72 }, | |
73 }, | |
74 ], | |
75 }], | |
76 ['OS!="ios"', { | |
77 'targets': [ | |
78 { | |
79 'target_name': 'crash_component_lib', | |
80 'type': 'static_library', | |
81 'sources': [ | |
82 'crash/content/app/crash_keys_win.cc', | |
83 'crash/content/app/crash_keys_win.h', | |
84 'crash/content/app/crash_reporter_client.cc', | |
85 'crash/content/app/crash_reporter_client.h', | |
86 ], | |
87 'include_dirs': [ | |
88 '..', | |
89 '../breakpad/src', | |
90 ], | |
91 }, | |
92 { | |
93 # TODO(mark): https://crbug.com/466890: merge this target with | |
94 # crash_component. | |
95 # | |
96 # This is a temporary base target that is depended on by both | |
97 # crash_component and crash_component_breakpad_to_be_deleted. It | |
98 # provides everything common to both of those targets. For a short | |
99 # period, there are two Mac and Windows crash component | |
100 # implementations. The new one uses a Crashpad implementation and is | |
101 # used by Chrome. The old one uses a Breakpad implementation and is | |
102 # used by content_shell. Consumers should depend on the desired | |
103 # target. All three targets behave identically on non-Mac/-Windows. | |
104 # When content_shell and any other consumers are migrated to the | |
105 # Crashpad implementation on Mac/Windows, crash_component will merge | |
106 # back into this target, crash_component_non_mac_win, which will be | |
107 # renamed crash_component. crash_component_breakpad_to_be_deleted will | |
108 # be deleted. | |
109 # | |
110 # While this situation exists: | |
111 # | |
112 # Do not depend on this target directly! Depend on | |
113 # crash_component_breakpad_to_be_deleted for old Breakpad behavior on | |
114 # all platforms, or preferably, depend on crash_component to get Break
pad | |
115 # everywhere except for Mac and Windows, where you will get Crashpad. | |
116 # | |
117 # GN version: //components/crash/content/app:app_non_mac | |
118 'target_name': 'crash_component_non_mac_win', | |
119 'variables': { | |
120 'conditions': [ | |
121 ['OS == "ios" or OS == "mac"', { | |
122 # On IOS there are no files compiled into the library, and we | |
123 # can't have libraries with zero objects. | |
124 # For now, the same applies to Mac OS X, until this target | |
125 # merges with crash_component. | |
126 'crash_component_target_type%': 'none', | |
127 }, { | |
128 'crash_component_target_type%': 'static_library', | |
129 }], | |
130 ], | |
131 }, | |
132 'type': '<(crash_component_target_type)', | |
133 'sources': [ | |
134 'crash/content/app/breakpad_linux.cc', | |
135 'crash/content/app/breakpad_linux.h', | |
136 'crash/content/app/breakpad_linux_impl.h', | |
137 'crash/content/app/hard_error_handler_win.cc', | |
138 'crash/content/app/hard_error_handler_win.h', | |
139 ], | |
140 'dependencies': [ | |
141 'crash_component_lib', | |
142 'crash_core_common', | |
143 '../base/base.gyp:base', | |
144 ], | |
145 'defines': ['CRASH_IMPLEMENTATION'], | |
146 'conditions': [ | |
147 ['OS=="win"', { | |
148 'dependencies': [ | |
149 '../breakpad/breakpad.gyp:breakpad_handler', | |
150 '../breakpad/breakpad.gyp:breakpad_sender', | |
151 '../sandbox/sandbox.gyp:sandbox', | |
152 ], | |
153 }], | |
154 ['os_posix == 1 and OS != "mac" and OS != "ios"', { | |
155 'dependencies': [ | |
156 '../breakpad/breakpad.gyp:breakpad_client', | |
157 ], | |
158 'include_dirs': [ | |
159 '../breakpad/src', | |
160 ], | |
161 }], | |
162 ['clang==1 and target_arch=="ia32"', { | |
163 'cflags!': [ | |
164 # Clang's -mstackrealign doesn't work well with | |
165 # linux_syscall_support.h hand written asm syscalls. | |
166 # See https://crbug.com/556393 | |
167 '-mstackrealign', | |
168 ], | |
169 }], | |
170 ], | |
171 'target_conditions': [ | |
172 # Need 'target_conditions' to override default filename_rules to inc
lude | |
173 # the files on Android. | |
174 ['OS=="android"', { | |
175 'sources/': [ | |
176 ['include', '^crash/content/app/breakpad_linux\\.cc$'], | |
177 ], | |
178 }], | |
179 ], | |
180 }, | |
181 { | |
182 # Note: if you depend on this target, you need to either link in | |
183 # content.gyp:content_common, or add | |
184 # content/public/common/content_switches.cc to your sources. | |
185 # | |
186 # GN version: //components/crash/content/app | |
187 | |
188 # TODO(mark): https://crbug.com/466890: merge this target with | |
189 # crash_component_non_mac_win. | |
190 # | |
191 # Most of this target is actually in its dependency, | |
192 # crash_component_non_mac_win. See the comment in that target for an | |
193 # explanation for the split. The split is temporary and the two target
s | |
194 # will be unified again soon. | |
195 'target_name': 'crash_component', | |
196 'variables': { | |
197 'conditions': [ | |
198 ['OS != "mac" and OS != "win"', { | |
199 # There are no source files except on Mac OS X and Windows. | |
200 'crash_component_target_type%': 'none', | |
201 }, { | |
202 'crash_component_target_type%': 'static_library', | |
203 }], | |
204 ], | |
205 }, | |
206 'type': '<(crash_component_target_type)', | |
207 'sources': [ | |
208 'crash/content/app/crash_switches.cc', | |
209 'crash/content/app/crash_switches.h', | |
210 'crash/content/app/crashpad.cc', | |
211 'crash/content/app/crashpad.h', | |
212 'crash/content/app/crashpad_mac.mm', | |
213 'crash/content/app/crashpad_win.cc', | |
214 'crash/content/app/run_as_crashpad_handler_win.cc', | |
215 'crash/content/app/run_as_crashpad_handler_win.h', | |
216 ], | |
217 'dependencies': [ | |
218 'crash_component_non_mac_win', | |
219 'crash_component_lib', | |
220 '../base/base.gyp:base', | |
221 '../third_party/kasko/kasko.gyp:kasko', | |
222 ], | |
223 'export_dependent_settings': [ | |
224 '../third_party/kasko/kasko.gyp:kasko', | |
225 ], | |
226 'conditions': [ | |
227 ['OS=="mac" or OS=="win"', { | |
228 'dependencies': [ | |
229 '../third_party/crashpad/crashpad/client/client.gyp:crashpad_cli
ent', | |
230 '../third_party/crashpad/crashpad/snapshot/snapshot.gyp:crashpad
_snapshot_api', | |
231 ], | |
232 }], | |
233 ['OS=="win"', { | |
234 'dependencies': [ | |
235 '../third_party/crashpad/crashpad/handler/handler.gyp:crashpad_h
andler_lib', | |
236 ], | |
237 }], | |
238 ], | |
239 'defines': ['CRASH_IMPLEMENTATION'], | |
240 }, | |
241 { | |
242 # TODO(mark): https://crbug.com/466890: remove this target. | |
243 # | |
244 # This is a temporary target provided for Mac and Windows Breakpad | |
245 # users that have not yet migrated to Crashpad (namely content_shell). | |
246 # This target will be removed shortly and all consumers will be | |
247 # expected to use Crashpad as the Mac and Windows crash-reporting | |
248 # client. See the comment in the crash_component_non_mac_win target | |
249 # for more details. | |
250 # | |
251 # GN version: //components/crash/content/app:app_breakpad_mac_to_be_de
leted | |
252 'target_name': 'crash_component_breakpad_to_be_deleted', | |
253 'variables': { | |
254 'conditions': [ | |
255 ['OS != "mac" and OS != "win"', { | |
256 # There are no source files on any platform but Mac OS X and | |
257 # Windows. | |
258 'crash_component_target_type%': 'none', | |
259 }, { | |
260 'crash_component_target_type%': 'static_library', | |
261 }], | |
262 ], | |
263 }, | |
264 'type': '<(crash_component_target_type)', | |
265 'sources': [ | |
266 'crash/content/app/breakpad_mac.h', | |
267 'crash/content/app/breakpad_mac.mm', | |
268 'crash/content/app/breakpad_win.cc', | |
269 'crash/content/app/breakpad_win.h', | |
270 ], | |
271 'dependencies': [ | |
272 'crash_component_non_mac_win', | |
273 'crash_component_lib', | |
274 ], | |
275 'defines': ['CRASH_IMPLEMENTATION'], | |
276 'conditions': [ | |
277 ['OS=="mac"', { | |
278 'dependencies': [ | |
279 '../breakpad/breakpad.gyp:breakpad', | |
280 ], | |
281 'include_dirs': [ | |
282 '..', | |
283 '../breakpad/src', | |
284 ], | |
285 }], | |
286 ['OS=="win"', { | |
287 'dependencies': [ | |
288 '../breakpad/breakpad.gyp:breakpad_handler', | |
289 ], | |
290 'include_dirs': [ | |
291 '..', | |
292 '../breakpad/src', | |
293 ], | |
294 'all_dependent_settings': { | |
295 'msvs_settings': { | |
296 'VCLinkerTool': { | |
297 'AdditionalDependencies': [ | |
298 'userenv.lib', | |
299 ], | |
300 }, | |
301 }, | |
302 }, | |
303 'msvs_settings': { | |
304 'VCLinkerTool': { | |
305 'AdditionalDependencies': [ | |
306 'userenv.lib', | |
307 ], | |
308 }, | |
309 }, | |
310 }], | |
311 ], | |
312 }, | |
313 { | |
314 # GN version: //components/crash/content/app:test_support | |
315 'target_name': 'crash_test_support', | |
316 'type': 'none', | |
317 'dependencies': [ | |
318 'crash_component_lib', | |
319 ], | |
320 'direct_dependent_settings': { | |
321 'include_dirs' : [ | |
322 '../breakpad/src', | |
323 ], | |
324 } | |
325 }, | |
326 ], | |
327 'conditions': [ | |
328 ['OS=="win"', { | |
329 'targets': [ | |
330 { | |
331 # GN version: //components/crash/content/tools:crash_service | |
332 'target_name': 'breakpad_crash_service', | |
333 'type': 'static_library', | |
334 'dependencies': [ | |
335 '../base/base.gyp:base', | |
336 '../breakpad/breakpad.gyp:breakpad_handler', | |
337 '../breakpad/breakpad.gyp:breakpad_sender', | |
338 ], | |
339 'sources': [ | |
340 'crash/content/tools/crash_service.cc', | |
341 'crash/content/tools/crash_service.h', | |
342 ], | |
343 }, | |
344 ], | |
345 }], | |
346 ['OS=="win" and target_arch=="ia32"', { | |
347 'targets': [ | |
348 { | |
349 # Note: if you depend on this target, you need to either link in | |
350 # content.gyp:content_common, or add | |
351 # content/public/common/content_switches.cc to your sources. | |
352 'target_name': 'breakpad_win64', | |
353 'type': 'static_library', | |
354 'sources': [ | |
355 'crash/content/app/breakpad_linux.cc', | |
356 'crash/content/app/breakpad_linux.h', | |
357 'crash/content/app/breakpad_linux_impl.h', | |
358 'crash/content/app/breakpad_mac.h', | |
359 'crash/content/app/breakpad_mac.mm', | |
360 'crash/content/app/breakpad_win.cc', | |
361 'crash/content/app/breakpad_win.h', | |
362 # TODO(siggi): test the x64 version too. | |
363 'crash/content/app/crash_keys_win.cc', | |
364 'crash/content/app/crash_keys_win.h', | |
365 'crash/content/app/crash_reporter_client.cc', | |
366 'crash/content/app/crash_reporter_client.h', | |
367 'crash/content/app/hard_error_handler_win.cc', | |
368 'crash/content/app/hard_error_handler_win.h', | |
369 ], | |
370 'defines': [ | |
371 'COMPILE_CONTENT_STATICALLY', | |
372 'CRASH_IMPLEMENTATION', | |
373 ], | |
374 'dependencies': [ | |
375 '../base/base.gyp:base_win64', | |
376 '../breakpad/breakpad.gyp:breakpad_handler_win64', | |
377 '../breakpad/breakpad.gyp:breakpad_sender_win64', | |
378 '../sandbox/sandbox.gyp:sandbox_win64', | |
379 ], | |
380 'configurations': { | |
381 'Common_Base': { | |
382 'msvs_target_platform': 'x64', | |
383 }, | |
384 }, | |
385 'conditions': [ | |
386 ['OS=="win"', { | |
387 'all_dependent_settings': { | |
388 'msvs_settings': { | |
389 'VCLinkerTool': { | |
390 'AdditionalDependencies': [ | |
391 'userenv.lib', | |
392 ], | |
393 }, | |
394 }, | |
395 }, | |
396 'msvs_settings': { | |
397 'VCLinkerTool': { | |
398 'AdditionalDependencies': [ | |
399 'userenv.lib', | |
400 ], | |
401 }, | |
402 }, | |
403 }], | |
404 ], | |
405 }, | |
406 { | |
407 # GN version: //components/crash/content/tools:crash_service | |
408 'target_name': 'breakpad_crash_service_win64', | |
409 'type': 'static_library', | |
410 'dependencies': [ | |
411 '../base/base.gyp:base_win64', | |
412 '../breakpad/breakpad.gyp:breakpad_handler_win64', | |
413 '../breakpad/breakpad.gyp:breakpad_sender_win64', | |
414 ], | |
415 'sources': [ | |
416 'crash/content/tools/crash_service.cc', | |
417 'crash/content/tools/crash_service.h', | |
418 ], | |
419 'configurations': { | |
420 'Common_Base': { | |
421 'msvs_target_platform': 'x64', | |
422 }, | |
423 }, | |
424 }, | |
425 ], | |
426 }], | |
427 ['OS=="mac"', { | |
428 'targets': [ | |
429 { | |
430 # GN version: //components/crash/content/app:breakpad_stubs | |
431 'target_name': 'breakpad_stubs', | |
432 'type': 'static_library', | |
433 'dependencies': [ | |
434 '../base/base.gyp:base', | |
435 ], | |
436 'sources': [ | |
437 'crash/content/app/breakpad_mac.h', | |
438 'crash/content/app/breakpad_mac_stubs.mm', | |
439 'crash/content/app/crash_reporter_client.cc', | |
440 'crash/content/app/crash_reporter_client.h', | |
441 ], | |
442 }, | |
443 ], | |
444 }], | |
445 ['os_posix == 1 and OS != "mac"', { | |
446 'targets': [ | |
447 { | |
448 # GN version: //components/crash/content/browser | |
449 'target_name': 'breakpad_host', | |
450 'type': 'static_library', | |
451 'dependencies': [ | |
452 'crash_component', | |
453 '../base/base.gyp:base', | |
454 '../breakpad/breakpad.gyp:breakpad_client', | |
455 '../content/content.gyp:content_browser', | |
456 '../content/content.gyp:content_common', | |
457 ], | |
458 'sources': [ | |
459 'crash/content/browser/crash_dump_manager_android.cc', | |
460 'crash/content/browser/crash_dump_manager_android.h', | |
461 'crash/content/browser/crash_handler_host_linux.cc', | |
462 'crash/content/browser/crash_handler_host_linux.h', | |
463 ], | |
464 'include_dirs': [ | |
465 '../breakpad/src', | |
466 ], | |
467 'direct_dependent_settings': { | |
468 'include_dirs': [ | |
469 '../breakpad/src', | |
470 ], | |
471 }, | |
472 'target_conditions': [ | |
473 # Need 'target_conditions' to override default filename_rules to
include | |
474 # the files on Android. | |
475 ['OS=="android"', { | |
476 'sources/': [ | |
477 ['include', '^crash/content/browser/crash_handler_host_linux
\\.cc$'], | |
478 ], | |
479 }], | |
480 ], | |
481 }, | |
482 ], | |
483 }], | |
484 ], | |
485 }], | |
486 ], | |
487 } | |
OLD | NEW |