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