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