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