MacViews: Support continuous scrolling and horizontal scrolling
[chromium-blink-merge.git] / breakpad / breakpad.gyp
blobac6a122f40bbff1bb6263deaa5098e4fbf0cf1f3
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             ['target_arch=="arm" and chromeos==1', {
505               # Avoid running out of registers in
506               # linux_syscall_support.h:sys_clone()'s inline assembly.
507               'cflags': ['-marm'],
508             }],
509             ['OS=="android"', {
510               'include_dirs': [
511                 'src/common/android/include',
512               ],
513               'direct_dependent_settings': {
514                 'include_dirs': [
515                   'src/common/android/include',
516                 ],
517               },
518               'sources': [
519                 'src/common/android/breakpad_getcontext.S',
520               ],
521             }],
522             ['OS!="android"', {
523               'link_settings': {
524                 'libraries': [
525                   # In case of Android, '-ldl' is added in common.gypi, since it
526                   # is needed for stlport_static. For LD, the order of libraries
527                   # is important, and thus we skip to add it here.
528                   '-ldl',
529                 ],
530               },
531             }],
532           ],
534           'include_dirs': [
535             'src',
536             'src/client',
537             'src/third_party/linux/include',
538             '..',
539             '.',
540           ],
541         },
542         {
543           # Breakpad r693 uses some files from src/processor in unit tests.
544           # GN version: //breakpad:processor_support
545           'target_name': 'breakpad_processor_support',
546           'type': 'static_library',
548           'sources': [
549             'src/common/scoped_ptr.h',
550             'src/processor/basic_code_modules.cc',
551             'src/processor/basic_code_modules.h',
552             'src/processor/logging.cc',
553             'src/processor/logging.h',
554             'src/processor/minidump.cc',
555             'src/processor/pathname_stripper.cc',
556             'src/processor/pathname_stripper.h',
557           ],
559           'include_dirs': [
560             'src',
561             'src/client',
562             'src/third_party/linux/include',
563             '..',
564             '.',
565           ],
566         },
567         {
568           # GN version: //breakpad:breakpad_unittests
569           'target_name': 'breakpad_unittests',
570           'type': 'executable',
571           'dependencies': [
572             '../testing/gtest.gyp:gtest',
573             '../testing/gtest.gyp:gtest_main',
574             '../testing/gmock.gyp:gmock',
575             'breakpad_client',
576             'breakpad_processor_support',
577             'linux_dumper_unittest_helper',
578           ],
579           'variables': {
580             'clang_warning_flags': [
581               # See http://crbug.com/138571#c18
582               '-Wno-unused-value',
583             ],
584           },
586           'sources': [
587             'linux/breakpad_googletest_includes.h',
588             'src/client/linux/handler/exception_handler_unittest.cc',
589             'src/client/linux/minidump_writer/cpu_set_unittest.cc',
590             'src/client/linux/minidump_writer/directory_reader_unittest.cc',
591             'src/client/linux/minidump_writer/line_reader_unittest.cc',
592             'src/client/linux/minidump_writer/linux_core_dumper_unittest.cc',
593             'src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc',
594             'src/client/linux/minidump_writer/minidump_writer_unittest.cc',
595             'src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc',
596             'src/client/linux/minidump_writer/proc_cpuinfo_reader_unittest.cc',
597             'src/common/linux/elf_core_dump_unittest.cc',
598             'src/common/linux/file_id_unittest.cc',
599             'src/common/linux/linux_libc_support_unittest.cc',
600             'src/common/linux/synth_elf.cc',
601             'src/common/linux/tests/auto_testfile.h',
602             'src/common/linux/tests/crash_generator.cc',
603             'src/common/linux/tests/crash_generator.h',
604             'src/common/memory_range.h',
605             'src/common/memory_unittest.cc',
606             'src/common/simple_string_dictionary_unittest.cc',
607             'src/common/test_assembler.cc',
608             'src/common/tests/file_utils.cc',
609             'src/common/tests/file_utils.h',
610             'src/tools/linux/md2core/minidump_memory_range.h',
611             'src/tools/linux/md2core/minidump_memory_range_unittest.cc',
612           ],
614           'include_dirs': [
615             'linux', # Use our copy of breakpad_googletest_includes.h
616             'src',
617             '..',
618             '.',
619           ],
620           'conditions': [
621             ['OS=="android"', {
622               'libraries': [
623                 '-llog',
624               ],
625               'include_dirs': [
626                 'src/common/android/include',
627               ],
628               'sources': [
629                 'src/common/android/breakpad_getcontext_unittest.cc',
630               ],
631             }],
632           ],
633         },
634         {
635           # GN version: //breakpad:linux_dumper_unittest_helper
636           'target_name': 'linux_dumper_unittest_helper',
637           'type': 'executable',
638           'dependencies': [
639             'breakpad_processor_support',
640           ],
641           'sources': [
642             'src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc',
643           ],
645           'include_dirs': [
646             'src',
647             '..',
648           ],
649           'conditions': [
650             ['target_arch=="mipsel" and OS=="android"', {
651               'include_dirs': [
652                 'src/common/android/include',
653               ],
654             }],
655           ],
656         },
657         {
658           # GN version: //breakpad:generate_test_dump
659           'target_name': 'generate_test_dump',
660           'type': 'executable',
662           'sources': [
663             'linux/generate-test-dump.cc',
664           ],
666           'dependencies': [
667             'breakpad_client',
668           ],
670           'include_dirs': [
671             '..',
672             'src',
673           ],
674           'conditions': [
675             ['OS=="android"', {
676               'libraries': [
677                 '-llog',
678               ],
679               'include_dirs': [
680                 'src/common/android/include',
681               ],
682             }],
683           ],
684         },
685         {
686           # GN version: //breakpad:minidump-2-core
687           'target_name': 'minidump-2-core',
688           'type': 'executable',
690           'sources': [
691             'src/tools/linux/md2core/minidump-2-core.cc'
692           ],
694           'dependencies': [
695             'breakpad_client',
696           ],
698           'include_dirs': [
699             '..',
700             'src',
701           ],
702         },
703         {
704           # GN version: //breakpad:core-2-minidump
705           'target_name': 'core-2-minidump',
706           'type': 'executable',
708           'sources': [
709             'src/tools/linux/core2md/core2md.cc'
710           ],
712           'dependencies': [
713             'breakpad_client',
714           ],
716           'include_dirs': [
717             '..',
718             'src',
719           ],
720         },
721       ],
722     }],
723     ['OS=="ios"', {
724       'targets': [
725         {
726           # GN version: //breakpad:client
727           'target_name': 'breakpad_client',
728           'type': 'static_library',
729           'sources': [
730             'src/client/ios/Breakpad.h',
731             'src/client/ios/Breakpad.mm',
732             'src/client/ios/BreakpadController.h',
733             'src/client/ios/BreakpadController.mm',
734             'src/client/ios/handler/ios_exception_minidump_generator.mm',
735             'src/client/ios/handler/ios_exception_minidump_generator.h',
736             'src/client/mac/crash_generation/ConfigFile.h',
737             'src/client/mac/crash_generation/ConfigFile.mm',
738             'src/client/mac/handler/breakpad_nlist_64.cc',
739             'src/client/mac/handler/breakpad_nlist_64.h',
740             'src/client/mac/handler/dynamic_images.cc',
741             'src/client/mac/handler/dynamic_images.h',
742             'src/client/mac/handler/protected_memory_allocator.cc',
743             'src/client/mac/handler/protected_memory_allocator.h',
744             'src/client/mac/handler/exception_handler.cc',
745             'src/client/mac/handler/exception_handler.h',
746             'src/client/mac/handler/minidump_generator.cc',
747             'src/client/mac/handler/minidump_generator.h',
748             'src/client/mac/sender/uploader.h',
749             'src/client/mac/sender/uploader.mm',
750             'src/client/minidump_file_writer.cc',
751             'src/client/minidump_file_writer.h',
752             'src/client/minidump_file_writer-inl.h',
753             'src/common/convert_UTF.c',
754             'src/common/convert_UTF.h',
755             'src/common/mac/file_id.cc',
756             'src/common/mac/file_id.h',
757             'src/common/mac/HTTPMultipartUpload.m',
758             'src/common/mac/macho_id.cc',
759             'src/common/mac/macho_id.h',
760             'src/common/mac/macho_utilities.cc',
761             'src/common/mac/macho_utilities.h',
762             'src/common/mac/macho_walker.cc',
763             'src/common/mac/macho_walker.h',
764             'src/common/mac/string_utilities.cc',
765             'src/common/mac/string_utilities.h',
766             'src/common/md5.cc',
767             'src/common/md5.h',
768             'src/common/simple_string_dictionary.cc',
769             'src/common/simple_string_dictionary.h',
770             'src/common/string_conversion.cc',
771             'src/common/string_conversion.h',
772             'src/google_breakpad/common/minidump_format.h',
773           ],
774           'include_dirs': [
775             'src',
776             'src/client/mac/Framework',
777             'src/common/mac',
778           ],
779         }
780       ]
781     }],
782     ['OS=="ios" and "<(GENERATOR)"!="ninja"', {
783       'variables': {
784         'ninja_output_dir': 'ninja-breakpad',
785         'ninja_product_dir':
786           '<(DEPTH)/xcodebuild/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
787       },
788       # Generation is done via two actions: (1) compiling the executable with
789       # ninja, and (2) copying the executable into a location that is shared
790       # with other projects. These actions are separated into two targets in
791       # order to be able to specify that the second action should not run until
792       # the first action finishes (since the ordering of multiple actions in
793       # one target is defined only by inputs and outputs, and it's impossible
794       # to set correct inputs for the ninja build, so setting all the inputs
795       # and outputs isn't an option).
796       'targets': [
797         {
798           'target_name': 'compile_breakpad_utilities',
799           'type': 'none',
800           'variables': {
801             # Gyp to rerun
802             're_run_targets': [
803               'breakpad/breakpad.gyp',
804             ],
805           },
806           'includes': ['../build/ios/mac_build.gypi'],
807           'actions': [
808             {
809               'action_name': 'compile breakpad utilities',
810               'inputs': [],
811               'outputs': [],
812               'action': [
813                 '<@(ninja_cmd)',
814                 'dump_syms',
815                 'symupload',
816               ],
817               'message': 'Generating the breakpad executables',
818             },
819           ],
820         },
821         {
822           'target_name': 'breakpad_utilities',
823           'type': 'none',
824           'dependencies': [
825             'compile_breakpad_utilities',
826           ],
827           'actions': [
828             {
829               'action_name': 'copy dump_syms',
830               'inputs': [
831                 '<(ninja_product_dir)/dump_syms',
832               ],
833               'outputs': [
834                 '<(PRODUCT_DIR)/dump_syms',
835               ],
836               'action': [
837                 'cp',
838                 '<(ninja_product_dir)/dump_syms',
839                 '<(PRODUCT_DIR)/dump_syms',
840               ],
841             },
842             {
843               'action_name': 'copy symupload',
844               'inputs': [
845                 '<(ninja_product_dir)/symupload',
846               ],
847               'outputs': [
848                 '<(PRODUCT_DIR)/symupload',
849               ],
850               'action': [
851                 'cp',
852                 '<(ninja_product_dir)/symupload',
853                 '<(PRODUCT_DIR)/symupload',
854               ],
855             },
856           ],
857         },
858         {
859           'target_name': 'dump_syms',
860           'type': 'none',
861           'dependencies': [
862             'breakpad_utilities',
863           ],
864         },
865         {
866           'target_name': 'symupload',
867           'type': 'none',
868           'dependencies': [
869             'breakpad_utilities',
870           ],
871         }
872       ],
873     }],
874     ['OS=="android"', {
875       'targets': [
876         {
877           'target_name': 'breakpad_unittests_stripped',
878           'type': 'none',
879           'dependencies': [ 'breakpad_unittests' ],
880           'actions': [{
881             'action_name': 'strip breakpad_unittests',
882             'inputs': [ '<(PRODUCT_DIR)/breakpad_unittests' ],
883             'outputs': [ '<(PRODUCT_DIR)/breakpad_unittests_stripped' ],
884             'action': [ '<(android_strip)', '<@(_inputs)', '-o', '<@(_outputs)' ],
885           }],
886         }
887       ],
888     }],
889   ],