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