Evict resources from resource pool after timeout
[chromium-blink-merge.git] / breakpad / breakpad.gyp
blobeffb863f1a13a305816270379f110777ffed2cdb
1 # Copyright (c) 2012 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.
6   'includes': [
7     'breakpad_sender.gypi',
8     'breakpad_handler.gypi',
9   ],
10   'conditions': [
11     # minidump_stackwalk and minidump_dump are tool-type executables that do
12     # not build on iOS with Xcode (but do build on iOS with ninja.)
13     ['(OS!="ios" or "<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja") and OS!="win"', {
14       'targets': [
15         {
16           # code shared by both {micro,mini}dump_stackwalk
17           # GN version: //breakpad:stackwalk_common
18           'target_name': 'stackwalk_common',
19           'type': 'static_library',
20           'includes': ['breakpad_tools.gypi'],
21           'defines': ['BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR'],
22           'sources': [
23             'src/processor/basic_code_module.h',
24             'src/processor/basic_code_modules.cc',
25             'src/processor/basic_code_modules.h',
26             'src/processor/basic_source_line_resolver.cc',
27             'src/processor/call_stack.cc',
28             'src/processor/cfi_frame_info.cc',
29             'src/processor/cfi_frame_info.h',
30             'src/processor/disassembler_x86.cc',
31             'src/processor/disassembler_x86.h',
32             'src/processor/dump_context.cc',
33             'src/processor/dump_object.cc',
34             'src/processor/logging.cc',
35             'src/processor/logging.h',
36             'src/processor/pathname_stripper.cc',
37             'src/processor/pathname_stripper.h',
38             'src/processor/process_state.cc',
39             'src/processor/proc_maps_linux.cc',
40             'src/processor/simple_symbol_supplier.cc',
41             'src/processor/simple_symbol_supplier.h',
42             'src/processor/source_line_resolver_base.cc',
43             'src/processor/stack_frame_cpu.cc',
44             'src/processor/stack_frame_symbolizer.cc',
45             'src/processor/stackwalk_common.cc',
46             'src/processor/stackwalker.cc',
47             'src/processor/stackwalker_amd64.cc',
48             'src/processor/stackwalker_amd64.h',
49             'src/processor/stackwalker_arm.cc',
50             'src/processor/stackwalker_arm.h',
51             'src/processor/stackwalker_arm64.cc',
52             'src/processor/stackwalker_arm64.h',
53             'src/processor/stackwalker_mips.cc',
54             'src/processor/stackwalker_mips.h',
55             'src/processor/stackwalker_ppc.cc',
56             'src/processor/stackwalker_ppc.h',
57             'src/processor/stackwalker_ppc64.cc',
58             'src/processor/stackwalker_ppc64.h',
59             'src/processor/stackwalker_sparc.cc',
60             'src/processor/stackwalker_sparc.h',
61             'src/processor/stackwalker_x86.cc',
62             'src/processor/stackwalker_x86.h',
63             'src/processor/tokenize.cc',
64             'src/processor/tokenize.h',
65             # libdisasm
66             'src/third_party/libdisasm/ia32_implicit.c',
67             'src/third_party/libdisasm/ia32_implicit.h',
68             'src/third_party/libdisasm/ia32_insn.c',
69             'src/third_party/libdisasm/ia32_insn.h',
70             'src/third_party/libdisasm/ia32_invariant.c',
71             'src/third_party/libdisasm/ia32_invariant.h',
72             'src/third_party/libdisasm/ia32_modrm.c',
73             'src/third_party/libdisasm/ia32_modrm.h',
74             'src/third_party/libdisasm/ia32_opcode_tables.c',
75             'src/third_party/libdisasm/ia32_opcode_tables.h',
76             'src/third_party/libdisasm/ia32_operand.c',
77             'src/third_party/libdisasm/ia32_operand.h',
78             'src/third_party/libdisasm/ia32_reg.c',
79             'src/third_party/libdisasm/ia32_reg.h',
80             'src/third_party/libdisasm/ia32_settings.c',
81             'src/third_party/libdisasm/ia32_settings.h',
82             'src/third_party/libdisasm/libdis.h',
83             'src/third_party/libdisasm/qword.h',
84             'src/third_party/libdisasm/x86_disasm.c',
85             'src/third_party/libdisasm/x86_format.c',
86             'src/third_party/libdisasm/x86_imm.c',
87             'src/third_party/libdisasm/x86_imm.h',
88             'src/third_party/libdisasm/x86_insn.c',
89             'src/third_party/libdisasm/x86_misc.c',
90             'src/third_party/libdisasm/x86_operand_list.c',
91             'src/third_party/libdisasm/x86_operand_list.h',
92           ],
93           'conditions': [
94             ['OS=="ios"', {
95               'toolsets': ['host'],
96             }],
97           ],
98         },
99         {
100           # GN version: //breakpad:microdump_stackwalk
101           'target_name': 'microdump_stackwalk',
102           'type': 'executable',
103           'dependencies': ['stackwalk_common'],
104           'includes': ['breakpad_tools.gypi'],
105           'defines': ['BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR'],
106           'sources': [
107             'src/processor/microdump.cc',
108             'src/processor/microdump_processor.cc',
109             'src/processor/microdump_stackwalk.cc',
110           ],
111           'conditions': [
112             ['OS=="ios"', {
113               'toolsets': ['host'],
114             }],
115           ],
116         },
117         {
118           # GN version: //breakpad:minidump_stackwalk
119           'target_name': 'minidump_stackwalk',
120           'type': 'executable',
121           'dependencies': ['stackwalk_common'],
122           'includes': ['breakpad_tools.gypi'],
123           'defines': ['BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR'],
124           'sources': [
125             'src/processor/exploitability.cc',
126             'src/processor/exploitability_linux.cc',
127             'src/processor/exploitability_linux.h',
128             'src/processor/exploitability_win.cc',
129             'src/processor/exploitability_win.h',
130             'src/processor/minidump.cc',
131             'src/processor/minidump_processor.cc',
132             'src/processor/minidump_stackwalk.cc',
133             'src/processor/symbolic_constants_win.cc',
134             'src/processor/symbolic_constants_win.h',
135           ],
136           'conditions': [
137             ['OS=="ios"', {
138               'toolsets': ['host'],
139             }],
140           ],
141         },
142         {
143           # GN version: //breakpad:minidump_dump
144           'target_name': 'minidump_dump',
145           'type': 'executable',
146           'includes': ['breakpad_tools.gypi'],
147           'sources': [
148             'src/processor/basic_code_module.h',
149             'src/processor/basic_code_modules.cc',
150             'src/processor/basic_code_modules.h',
151             'src/processor/dump_context.cc',
152             'src/processor/dump_object.cc',
153             'src/processor/logging.cc',
154             'src/processor/logging.h',
155             'src/processor/minidump.cc',
156             'src/processor/minidump_dump.cc',
157             'src/processor/pathname_stripper.cc',
158             'src/processor/pathname_stripper.h',
159             'src/processor/proc_maps_linux.cc',
160           ],
161           'conditions': [
162             ['OS=="ios"', {
163               'toolsets': ['host'],
164             }],
165           ],
166         },
167       ],
168     }],
169     ['OS=="mac" or (OS=="ios" and ("<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja"))', {
170       'target_defaults': {
171         'include_dirs': [
172           'src',
173         ],
174         'configurations': {
175           'Debug_Base': {
176             'defines': [
177               # This is needed for GTMLogger to work correctly.
178               'DEBUG',
179             ],
180           },
181         },
182       },
183       'targets': [
184         {
185           # GN version: //breakpad:dump_syms
186           'target_name': 'dump_syms',
187           'type': 'executable',
188           'toolsets': ['host'],
189           'include_dirs': [
190             'src/common/mac',
191           ],
192           'sources': [
193             'src/common/dwarf/bytereader.cc',
194             'src/common/dwarf_cfi_to_module.cc',
195             'src/common/dwarf_cu_to_module.cc',
196             'src/common/dwarf/dwarf2diehandler.cc',
197             'src/common/dwarf/dwarf2reader.cc',
198             'src/common/dwarf_line_to_module.cc',
199             'src/common/language.cc',
200             'src/common/mac/arch_utilities.cc',
201             'src/common/mac/arch_utilities.h',
202             'src/common/mac/dump_syms.mm',
203             'src/common/mac/file_id.cc',
204             'src/common/mac/macho_id.cc',
205             'src/common/mac/macho_reader.cc',
206             'src/common/mac/macho_utilities.cc',
207             'src/common/mac/macho_walker.cc',
208             'src/common/md5.cc',
209             'src/common/module.cc',
210             'src/common/stabs_reader.cc',
211             'src/common/stabs_to_module.cc',
212             'src/tools/mac/dump_syms/dump_syms_tool.mm',
213           ],
214           'defines': [
215             # For src/common/stabs_reader.h.
216             'HAVE_MACH_O_NLIST_H',
217           ],
218           'xcode_settings': {
219             # Like ld, dump_syms needs to operate on enough data that it may
220             # actually need to be able to address more than 4GB. Use x86_64.
221             # Don't worry! An x86_64 dump_syms is perfectly able to dump
222             # 32-bit files.
223             'ARCHS': [
224               'x86_64',
225             ],
227             # The DWARF utilities require -funsigned-char.
228             'GCC_CHAR_IS_UNSIGNED_CHAR': 'YES',
230             # dwarf2reader.cc uses dynamic_cast.
231             'GCC_ENABLE_CPP_RTTI': 'YES',
232           },
233           'link_settings': {
234             'libraries': [
235               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
236             ],
237           },
238           'configurations': {
239             'Release_Base': {
240               'xcode_settings': {
241                 # dump_syms crashes when built at -O1, -O2, and -O3.  It does
242                 # not crash at -Os.  To play it safe, dump_syms is always built
243                 # at -O0 until this can be sorted out.
244                 # http://code.google.com/p/google-breakpad/issues/detail?id=329
245                 'GCC_OPTIMIZATION_LEVEL': '0',  # -O0
246                },
247              },
248           },
249         },
250         {
251           # GN version: //breakpad:symupload
252           'target_name': 'symupload',
253           'type': 'executable',
254           'toolsets': ['host'],
255           'include_dirs': [
256             'src/common/mac',
257           ],
258           'sources': [
259             'src/common/mac/HTTPMultipartUpload.m',
260             'src/tools/mac/symupload/symupload.m',
261           ],
262           'link_settings': {
263             'libraries': [
264               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
265             ],
266           }
267         },
268       ],
269     }],
270     ['OS=="mac"', {
271       'target_defaults': {
272         'include_dirs': [
273           'src',
274         ],
275         'configurations': {
276           'Debug_Base': {
277             'defines': [
278               # This is needed for GTMLogger to work correctly.
279               'DEBUG',
280             ],
281           },
282         },
283       },
284       'targets': [
285         {
286           # GN version: //breakpad:utilities
287           'target_name': 'breakpad_utilities',
288           'type': 'static_library',
289           'sources': [
290             'src/client/mac/crash_generation/ConfigFile.mm',
291             'src/client/mac/handler/breakpad_nlist_64.cc',
292             'src/client/mac/handler/dynamic_images.cc',
293             'src/client/mac/handler/minidump_generator.cc',
294             'src/client/minidump_file_writer.cc',
295             'src/common/convert_UTF.c',
296             'src/common/mac/MachIPC.mm',
297             'src/common/mac/arch_utilities.cc',
298             'src/common/mac/bootstrap_compat.cc',
299             'src/common/mac/file_id.cc',
300             'src/common/mac/launch_reporter.cc',
301             'src/common/mac/macho_id.cc',
302             'src/common/mac/macho_utilities.cc',
303             'src/common/mac/macho_walker.cc',
304             'src/common/mac/string_utilities.cc',
305             'src/common/md5.cc',
306             'src/common/simple_string_dictionary.cc',
307             'src/common/string_conversion.cc',
308           ],
309           'conditions': [
310             ['OS=="ios"', {
311               'xcode_settings' : {
312                 'WARNING_CFLAGS': [
313                   # MinidumpGenerator uses an API deprecated in iOS 7.
314                   # crbug.com/408562
315                   '-Wno-deprecated-declarations',
316                 ],
317               },
318             }],
319           ],
320         },
321         {
322           # GN version: //breakpad:crash_inspector
323           'target_name': 'crash_inspector',
324           'type': 'executable',
325           'variables': {
326             'mac_real_dsym': 1,
327           },
328           'dependencies': [
329             'breakpad_utilities',
330           ],
331           'include_dirs': [
332             'src/client/apple/Framework',
333             'src/common/mac',
334           ],
335           'sources': [
336             'src/client/mac/crash_generation/Inspector.mm',
337             'src/client/mac/crash_generation/InspectorMain.mm',
338           ],
339           'link_settings': {
340             'libraries': [
341               '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
342               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
343             ],
344           }
345         },
346         {
347           # GN version: //breakpad:crash_report_sender
348           'target_name': 'crash_report_sender',
349           'type': 'executable',
350           'mac_bundle': 1,
351           'variables': {
352             'mac_real_dsym': 1,
353           },
354           'include_dirs': [
355             'src/common/mac',
356           ],
357           'sources': [
358             'src/common/mac/HTTPMultipartUpload.m',
359             'src/client/mac/sender/crash_report_sender.m',
360             'src/client/mac/sender/uploader.mm',
361             'src/common/mac/GTMLogger.m',
362           ],
363           'mac_bundle_resources': [
364             'src/client/mac/sender/English.lproj/Localizable.strings',
365             'src/client/mac/sender/crash_report_sender.icns',
366             'src/client/mac/sender/Breakpad.xib',
367             'src/client/mac/sender/crash_report_sender-Info.plist',
368           ],
369           'mac_bundle_resources!': [
370              'src/client/mac/sender/crash_report_sender-Info.plist',
371           ],
372           'xcode_settings': {
373              'INFOPLIST_FILE': 'src/client/mac/sender/crash_report_sender-Info.plist',
374           },
375           'link_settings': {
376             'libraries': [
377               '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
378               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
379               '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
380             ],
381           }
382         },
383         {
384           # GN version: //breakpad
385           'target_name': 'breakpad',
386           'type': 'static_library',
387           'dependencies': [
388             'breakpad_utilities',
389             'crash_inspector',
390             'crash_report_sender',
391           ],
392           'include_dirs': [
393             'src/client/apple/Framework',
394           ],
395           'direct_dependent_settings': {
396             'include_dirs': [
397               'src/client/apple/Framework',
398             ],
399           },
400           'defines': [
401             'USE_PROTECTED_ALLOCATIONS=1',
402           ],
403           'sources': [
404             'src/client/mac/crash_generation/crash_generation_client.cc',
405             'src/client/mac/crash_generation/crash_generation_client.h',
406             'src/client/mac/handler/protected_memory_allocator.cc',
407             'src/client/mac/handler/exception_handler.cc',
408             'src/client/mac/Framework/Breakpad.mm',
409             'src/client/mac/Framework/OnDemandServer.mm',
410           ],
411         },
412       ],
413     }],
414     [ 'OS=="linux" or OS=="android" or os_bsd==1', {
415       'conditions': [
416         ['OS=="android"', {
417           'defines': [
418             '__ANDROID__',
419           ],
420         }],
421       ],
422       # Tools needed for archiving build symbols.
423       'targets': [
424         {
425           # GN version: //breakpad:symupload
426           'target_name': 'symupload',
427           'type': 'executable',
429           'includes': ['breakpad_tools.gypi'],
431           'sources': [
432             'src/tools/linux/symupload/sym_upload.cc',
433             'src/common/linux/http_upload.cc',
434             'src/common/linux/http_upload.h',
435           ],
436           'include_dirs': [
437             'src',
438             'src/third_party',
439           ],
440           'link_settings': {
441             'libraries': [
442               '-ldl',
443             ],
444           },
445         },
446         {
447           # GN version: //breakpad:dump_syms
448           'target_name': 'dump_syms',
449           'type': 'executable',
450           'toolsets': ['host'],
452           # dwarf2reader.cc uses dynamic_cast. Because we don't typically
453           # don't support RTTI, we enable it for this single target. Since
454           # dump_syms doesn't share any object files with anything else,
455           # this doesn't end up polluting Chrome itself.
456           'cflags_cc!': ['-fno-rtti'],
458           'sources': [
459             'src/common/dwarf/bytereader.cc',
460             'src/common/dwarf_cfi_to_module.cc',
461             'src/common/dwarf_cfi_to_module.h',
462             'src/common/dwarf_cu_to_module.cc',
463             'src/common/dwarf_cu_to_module.h',
464             'src/common/dwarf/dwarf2diehandler.cc',
465             'src/common/dwarf/dwarf2reader.cc',
466             'src/common/dwarf_line_to_module.cc',
467             'src/common/dwarf_line_to_module.h',
468             'src/common/language.cc',
469             'src/common/language.h',
470             'src/common/linux/crc32.cc',
471             'src/common/linux/crc32.h',
472             'src/common/linux/dump_symbols.cc',
473             'src/common/linux/dump_symbols.h',
474             'src/common/linux/elf_symbols_to_module.cc',
475             'src/common/linux/elf_symbols_to_module.h',
476             'src/common/linux/elfutils.cc',
477             'src/common/linux/elfutils.h',
478             'src/common/linux/file_id.cc',
479             'src/common/linux/file_id.h',
480             'src/common/linux/linux_libc_support.cc',
481             'src/common/linux/linux_libc_support.h',
482             'src/common/linux/memory_mapped_file.cc',
483             'src/common/linux/memory_mapped_file.h',
484             'src/common/linux/guid_creator.h',
485             'src/common/module.cc',
486             'src/common/module.h',
487             'src/common/stabs_reader.cc',
488             'src/common/stabs_reader.h',
489             'src/common/stabs_to_module.cc',
490             'src/common/stabs_to_module.h',
491             'src/tools/linux/dump_syms/dump_syms.cc',
492           ],
494           # Breakpad rev 583 introduced this flag.
495           # Using this define, stabs_reader.h will include a.out.h to
496           # build on Linux.
497           'defines': [
498             'HAVE_A_OUT_H',
499           ],
501           'include_dirs': [
502             'src',
503             '..',
504           ],
505         },
506         {
507           # GN version: //breakpad:client
508           'target_name': 'breakpad_client',
509           'type': 'static_library',
511           'sources': [
512             'src/client/linux/crash_generation/crash_generation_client.cc',
513             'src/client/linux/crash_generation/crash_generation_client.h',
514             'src/client/linux/handler/exception_handler.cc',
515             'src/client/linux/handler/exception_handler.h',
516             'src/client/linux/handler/minidump_descriptor.cc',
517             'src/client/linux/handler/minidump_descriptor.h',
518             'src/client/linux/log/log.cc',
519             'src/client/linux/log/log.h',
520             'src/client/linux/dump_writer_common/mapping_info.h',
521             'src/client/linux/dump_writer_common/thread_info.cc',
522             'src/client/linux/dump_writer_common/thread_info.h',
523             'src/client/linux/dump_writer_common/ucontext_reader.cc',
524             'src/client/linux/dump_writer_common/ucontext_reader.h',
525             'src/client/linux/microdump_writer/microdump_writer.cc',
526             'src/client/linux/microdump_writer/microdump_writer.h',
527             'src/client/linux/minidump_writer/cpu_set.h',
528             'src/client/linux/minidump_writer/directory_reader.h',
529             'src/client/linux/minidump_writer/line_reader.h',
530             'src/client/linux/minidump_writer/linux_core_dumper.cc',
531             'src/client/linux/minidump_writer/linux_core_dumper.h',
532             'src/client/linux/minidump_writer/linux_dumper.cc',
533             'src/client/linux/minidump_writer/linux_dumper.h',
534             'src/client/linux/minidump_writer/linux_ptrace_dumper.cc',
535             'src/client/linux/minidump_writer/linux_ptrace_dumper.h',
536             'src/client/linux/minidump_writer/minidump_writer.cc',
537             'src/client/linux/minidump_writer/minidump_writer.h',
538             'src/client/linux/minidump_writer/proc_cpuinfo_reader.h',
539             'src/client/minidump_file_writer-inl.h',
540             'src/client/minidump_file_writer.cc',
541             'src/client/minidump_file_writer.h',
542             'src/common/convert_UTF.c',
543             'src/common/convert_UTF.h',
544             'src/common/linux/elf_core_dump.cc',
545             'src/common/linux/elf_core_dump.h',
546             'src/common/linux/elfutils.cc',
547             'src/common/linux/elfutils.h',
548             'src/common/linux/file_id.cc',
549             'src/common/linux/file_id.h',
550             'src/common/linux/google_crashdump_uploader.cc',
551             'src/common/linux/google_crashdump_uploader.h',
552             'src/common/linux/guid_creator.cc',
553             'src/common/linux/guid_creator.h',
554             'src/common/linux/libcurl_wrapper.cc',
555             'src/common/linux/libcurl_wrapper.h',
556             'src/common/linux/linux_libc_support.cc',
557             'src/common/linux/linux_libc_support.h',
558             'src/common/linux/memory_mapped_file.cc',
559             'src/common/linux/memory_mapped_file.h',
560             'src/common/linux/safe_readlink.cc',
561             'src/common/linux/safe_readlink.h',
562             'src/common/memory.h',
563             'src/common/simple_string_dictionary.cc',
564             'src/common/simple_string_dictionary.h',
565             'src/common/string_conversion.cc',
566             'src/common/string_conversion.h',
567           ],
569           'conditions': [
570             ['target_arch=="arm" and chromeos==1', {
571               # Avoid running out of registers in
572               # linux_syscall_support.h:sys_clone()'s inline assembly.
573               'cflags': ['-marm'],
574             }],
575             ['OS=="android"', {
576               'include_dirs': [
577                 'src/common/android/include',
578               ],
579               'direct_dependent_settings': {
580                 'include_dirs': [
581                   'src/common/android/include',
582                 ],
583               },
584               'sources': [
585                 'src/common/android/breakpad_getcontext.S',
586               ],
587             }],
588             ['OS!="android"', {
589               'link_settings': {
590                 'libraries': [
591                   # In case of Android, '-ldl' is added in common.gypi, since it
592                   # is needed for stlport_static. For LD, the order of libraries
593                   # is important, and thus we skip to add it here.
594                   '-ldl',
595                 ],
596               },
597             }],
598           ],
600           'include_dirs': [
601             'src',
602             'src/client',
603             'src/third_party/linux/include',
604             '..',
605             '.',
606           ],
607         },
608         {
609           # Breakpad r693 uses some files from src/processor in unit tests.
610           # GN version: //breakpad:processor_support
611           'target_name': 'breakpad_processor_support',
612           'type': 'static_library',
614           'sources': [
615             'src/common/scoped_ptr.h',
616             'src/processor/basic_code_modules.cc',
617             'src/processor/basic_code_modules.h',
618             'src/processor/dump_context.cc',
619             'src/processor/dump_object.cc',
620             'src/processor/logging.cc',
621             'src/processor/logging.h',
622             'src/processor/minidump.cc',
623             'src/processor/pathname_stripper.cc',
624             'src/processor/pathname_stripper.h',
625             'src/processor/proc_maps_linux.cc',
626           ],
628           'include_dirs': [
629             'src',
630             'src/client',
631             'src/third_party/linux/include',
632             '..',
633             '.',
634           ],
635         },
636         {
637           # GN version: //breakpad:breakpad_unittests
638           'target_name': 'breakpad_unittests',
639           'type': 'executable',
640           'dependencies': [
641             '../testing/gtest.gyp:gtest',
642             '../testing/gtest.gyp:gtest_main',
643             '../testing/gmock.gyp:gmock',
644             'breakpad_client',
645             'breakpad_processor_support',
646             'linux_dumper_unittest_helper',
647           ],
648           'variables': {
649             'clang_warning_flags': [
650               # See http://crbug.com/138571#c18
651               '-Wno-unused-value',
652             ],
653           },
655           'sources': [
656             'linux/breakpad_googletest_includes.h',
657             'src/client/linux/handler/exception_handler_unittest.cc',
658             'src/client/linux/minidump_writer/cpu_set_unittest.cc',
659             'src/client/linux/minidump_writer/directory_reader_unittest.cc',
660             'src/client/linux/minidump_writer/line_reader_unittest.cc',
661             'src/client/linux/minidump_writer/linux_core_dumper_unittest.cc',
662             'src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc',
663             'src/client/linux/minidump_writer/minidump_writer_unittest.cc',
664             'src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc',
665             'src/client/linux/minidump_writer/proc_cpuinfo_reader_unittest.cc',
666             'src/common/linux/elf_core_dump_unittest.cc',
667             'src/common/linux/file_id_unittest.cc',
668             'src/common/linux/linux_libc_support_unittest.cc',
669             'src/common/linux/synth_elf.cc',
670             'src/common/linux/tests/auto_testfile.h',
671             'src/common/linux/tests/crash_generator.cc',
672             'src/common/linux/tests/crash_generator.h',
673             'src/common/memory_range.h',
674             'src/common/memory_unittest.cc',
675             'src/common/simple_string_dictionary_unittest.cc',
676             'src/common/test_assembler.cc',
677             'src/common/tests/file_utils.cc',
678             'src/common/tests/file_utils.h',
679             'src/tools/linux/md2core/minidump_memory_range.h',
680             'src/tools/linux/md2core/minidump_memory_range_unittest.cc',
681           ],
683           'include_dirs': [
684             'linux', # Use our copy of breakpad_googletest_includes.h
685             'src',
686             '..',
687             '.',
688           ],
689           'conditions': [
690             ['OS=="android"', {
691               'libraries': [
692                 '-llog',
693               ],
694               'include_dirs': [
695                 'src/common/android/include',
696               ],
697               'sources': [
698                 'src/common/android/breakpad_getcontext_unittest.cc',
699               ],
700               'variables': {
701                 'test_type': 'gtest',
702                 'test_suite_name': '<(_target_name)',
703                 'isolate_file': 'breakpad_unittests.isolate',
704               },
705               'includes': [ '../build/android/test_runner.gypi' ],
706             }],
707           ],
708         },
709         {
710           # GN version: //breakpad:linux_dumper_unittest_helper
711           'target_name': 'linux_dumper_unittest_helper',
712           'type': 'executable',
713           'dependencies': [
714             'breakpad_processor_support',
715           ],
716           'sources': [
717             'src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc',
718           ],
720           'include_dirs': [
721             'src',
722             '..',
723           ],
724           'conditions': [
725             ['target_arch=="mipsel" and OS=="android"', {
726               'include_dirs': [
727                 'src/common/android/include',
728               ],
729             }],
730           ],
731         },
732         {
733           # GN version: //breakpad:generate_test_dump
734           'target_name': 'generate_test_dump',
735           'type': 'executable',
737           'sources': [
738             'linux/generate-test-dump.cc',
739           ],
741           'dependencies': [
742             'breakpad_client',
743           ],
745           'include_dirs': [
746             '..',
747             'src',
748           ],
749           'conditions': [
750             ['OS=="android"', {
751               'libraries': [
752                 '-llog',
753               ],
754               'include_dirs': [
755                 'src/common/android/include',
756               ],
757             }],
758           ],
759         },
760         {
761           # GN version: //breakpad:minidump-2-core
762           'target_name': 'minidump-2-core',
763           'type': 'executable',
765           'sources': [
766             'src/tools/linux/md2core/minidump-2-core.cc'
767           ],
769           'dependencies': [
770             'breakpad_client',
771           ],
773           'include_dirs': [
774             '..',
775             'src',
776           ],
777         },
778         {
779           # GN version: //breakpad:core-2-minidump
780           'target_name': 'core-2-minidump',
781           'type': 'executable',
783           'sources': [
784             'src/tools/linux/core2md/core2md.cc'
785           ],
787           'dependencies': [
788             'breakpad_client',
789           ],
791           'include_dirs': [
792             '..',
793             'src',
794           ],
795         },
796       ],
797     }],
798     ['OS=="ios"', {
799       'targets': [
800         {
801           # GN version: //breakpad:client
802           'target_name': 'breakpad_client',
803           'type': 'static_library',
804           'sources': [
805             'src/client/ios/Breakpad.h',
806             'src/client/ios/Breakpad.mm',
807             'src/client/ios/BreakpadController.h',
808             'src/client/ios/BreakpadController.mm',
809             'src/client/ios/handler/ios_exception_minidump_generator.mm',
810             'src/client/ios/handler/ios_exception_minidump_generator.h',
811             'src/client/mac/crash_generation/ConfigFile.h',
812             'src/client/mac/crash_generation/ConfigFile.mm',
813             'src/client/mac/handler/breakpad_nlist_64.cc',
814             'src/client/mac/handler/breakpad_nlist_64.h',
815             'src/client/mac/handler/dynamic_images.cc',
816             'src/client/mac/handler/dynamic_images.h',
817             'src/client/mac/handler/protected_memory_allocator.cc',
818             'src/client/mac/handler/protected_memory_allocator.h',
819             'src/client/mac/handler/exception_handler.cc',
820             'src/client/mac/handler/exception_handler.h',
821             'src/client/mac/handler/minidump_generator.cc',
822             'src/client/mac/handler/minidump_generator.h',
823             'src/client/mac/sender/uploader.h',
824             'src/client/mac/sender/uploader.mm',
825             'src/client/minidump_file_writer.cc',
826             'src/client/minidump_file_writer.h',
827             'src/client/minidump_file_writer-inl.h',
828             'src/common/convert_UTF.c',
829             'src/common/convert_UTF.h',
830             'src/common/mac/file_id.cc',
831             'src/common/mac/file_id.h',
832             'src/common/mac/HTTPMultipartUpload.m',
833             'src/common/mac/macho_id.cc',
834             'src/common/mac/macho_id.h',
835             'src/common/mac/macho_utilities.cc',
836             'src/common/mac/macho_utilities.h',
837             'src/common/mac/macho_walker.cc',
838             'src/common/mac/macho_walker.h',
839             'src/common/mac/string_utilities.cc',
840             'src/common/mac/string_utilities.h',
841             'src/common/md5.cc',
842             'src/common/md5.h',
843             'src/common/simple_string_dictionary.cc',
844             'src/common/simple_string_dictionary.h',
845             'src/common/string_conversion.cc',
846             'src/common/string_conversion.h',
847             'src/google_breakpad/common/minidump_format.h',
848           ],
849           'include_dirs': [
850             'src',
851             'src/client/mac/Framework',
852             'src/common/mac',
853           ],
854           'direct_dependent_settings': {
855             'include_dirs': [
856               'src',
857             ],
858           },
859         }
860       ]
861     }],
862     ['OS=="ios" and "<(GENERATOR)"=="xcode" and "<(GENERATOR_FLAVOR)"!="ninja"', {
863       'variables': {
864         'ninja_output_dir': 'ninja-breakpad',
865         'ninja_product_dir':
866           '<(DEPTH)/xcodebuild/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
867       },
868       # Generation is done via two actions: (1) compiling the executable with
869       # ninja, and (2) copying the executable into a location that is shared
870       # with other projects. These actions are separated into two targets in
871       # order to be able to specify that the second action should not run until
872       # the first action finishes (since the ordering of multiple actions in
873       # one target is defined only by inputs and outputs, and it's impossible
874       # to set correct inputs for the ninja build, so setting all the inputs
875       # and outputs isn't an option).
876       'targets': [
877         {
878           'target_name': 'compile_breakpad_utilities',
879           'type': 'none',
880           'variables': {
881             # Gyp to rerun
882             're_run_targets': [
883               'breakpad/breakpad.gyp',
884             ],
885           },
886           'includes': ['../build/ios/mac_build.gypi'],
887           'actions': [
888             {
889               'action_name': 'compile breakpad utilities',
890               'inputs': [],
891               'outputs': [],
892               'action': [
893                 '<@(ninja_cmd)',
894                 'dump_syms',
895                 'symupload',
896               ],
897               'message': 'Generating the breakpad executables',
898             },
899           ],
900         },
901         {
902           'target_name': 'breakpad_utilities',
903           'type': 'none',
904           'dependencies': [
905             'compile_breakpad_utilities',
906           ],
907           'actions': [
908             {
909               'action_name': 'copy dump_syms',
910               'inputs': [
911                 '<(ninja_product_dir)/dump_syms',
912               ],
913               'outputs': [
914                 '<(PRODUCT_DIR)/dump_syms',
915               ],
916               'action': [
917                 'cp',
918                 '<(ninja_product_dir)/dump_syms',
919                 '<(PRODUCT_DIR)/dump_syms',
920               ],
921             },
922             {
923               'action_name': 'copy symupload',
924               'inputs': [
925                 '<(ninja_product_dir)/symupload',
926               ],
927               'outputs': [
928                 '<(PRODUCT_DIR)/symupload',
929               ],
930               'action': [
931                 'cp',
932                 '<(ninja_product_dir)/symupload',
933                 '<(PRODUCT_DIR)/symupload',
934               ],
935             },
936           ],
937         },
938         {
939           'target_name': 'dump_syms',
940           'type': 'none',
941           'dependencies': [
942             'breakpad_utilities',
943           ],
944         },
945         {
946           'target_name': 'symupload',
947           'type': 'none',
948           'dependencies': [
949             'breakpad_utilities',
950           ],
951         }
952       ],
953     }],
954     ['OS=="android"', {
955       'targets': [
956         {
957           'target_name': 'breakpad_unittests_stripped',
958           'type': 'none',
959           'dependencies': [ 'breakpad_unittests' ],
960           'actions': [{
961             'action_name': 'strip breakpad_unittests',
962             'inputs': [ '<(PRODUCT_DIR)/breakpad_unittests' ],
963             'outputs': [ '<(PRODUCT_DIR)/breakpad_unittests_stripped' ],
964             'action': [ '<(android_strip)', '<@(_inputs)', '-o', '<@(_outputs)' ],
965           }],
966         },
967         {
968           'target_name': 'breakpad_unittests_deps',
969           'type': 'none',
970           'dependencies': [
971             'breakpad_unittests_stripped',
972           ],
973           # For the component build, ensure dependent shared libraries are
974           # stripped and put alongside breakpad_unittest to simplify pushing to
975           # the device.
976           'variables': {
977              'output_dir': '<(PRODUCT_DIR)/breakpad_unittests_deps/',
978              'native_binary': '<(PRODUCT_DIR)/breakpad_unittests_stripped',
979              'include_main_binary': 0,
980           },
981           'includes': [
982             '../build/android/native_app_dependencies.gypi'
983           ],
984         }
985       ],
986     }],
987   ],