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