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