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