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.
7 'breakpad_sender.gypi',
8 'breakpad_handler.gypi',
19 # This is needed for GTMLogger to work correctly.
27 'target_name': 'breakpad_utilities',
28 'type': 'static_library',
30 'src/client/mac/handler/breakpad_nlist_64.cc',
31 'src/client/mac/handler/dynamic_images.cc',
32 'src/client/mac/handler/minidump_generator.cc',
33 'src/client/minidump_file_writer.cc',
34 'src/common/convert_UTF.c',
35 'src/common/mac/MachIPC.mm',
36 'src/common/mac/SimpleStringDictionary.mm',
37 'src/common/mac/arch_utilities.cc',
38 'src/common/mac/bootstrap_compat.cc',
39 'src/common/mac/file_id.cc',
40 'src/common/mac/macho_id.cc',
41 'src/common/mac/macho_utilities.cc',
42 'src/common/mac/macho_walker.cc',
43 'src/common/mac/string_utilities.cc',
45 'src/common/string_conversion.cc',
49 'target_name': 'crash_inspector',
58 'src/client/apple/Framework',
62 'src/client/mac/crash_generation/ConfigFile.mm',
63 'src/client/mac/crash_generation/Inspector.mm',
64 'src/client/mac/crash_generation/InspectorMain.mm',
68 '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
69 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
74 'target_name': 'crash_report_sender',
84 'src/common/mac/HTTPMultipartUpload.m',
85 'src/client/mac/sender/crash_report_sender.m',
86 'src/client/mac/sender/uploader.mm',
87 'src/common/mac/GTMLogger.m',
89 'mac_bundle_resources': [
90 'src/client/mac/sender/English.lproj/Localizable.strings',
91 'src/client/mac/sender/crash_report_sender.icns',
92 'src/client/mac/sender/Breakpad.xib',
93 'src/client/mac/sender/crash_report_sender-Info.plist',
95 'mac_bundle_resources!': [
96 'src/client/mac/sender/crash_report_sender-Info.plist',
99 'INFOPLIST_FILE': 'src/client/mac/sender/crash_report_sender-Info.plist',
103 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
104 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
105 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
110 'target_name': 'dump_syms',
111 'type': 'executable',
113 # ++ ensures this comes before src brought in from target_defaults.
120 'pending/src/common/dwarf_cu_to_module.cc',
121 'pending/src/common/module.cc',
122 'src/common/dwarf/bytereader.cc',
123 'src/common/dwarf_cfi_to_module.cc',
124 'src/common/dwarf/dwarf2diehandler.cc',
125 'src/common/dwarf/dwarf2reader.cc',
126 'src/common/dwarf_line_to_module.cc',
127 'src/common/language.cc',
128 'src/common/mac/arch_utilities.cc',
129 'src/common/mac/arch_utilities.h',
130 'src/common/mac/dump_syms.mm',
131 'src/common/mac/file_id.cc',
132 'src/common/mac/macho_id.cc',
133 'src/common/mac/macho_reader.cc',
134 'src/common/mac/macho_utilities.cc',
135 'src/common/mac/macho_walker.cc',
137 'src/common/stabs_reader.cc',
138 'src/common/stabs_to_module.cc',
139 'src/tools/mac/dump_syms/dump_syms_tool.mm',
142 # For src/common/stabs_reader.h.
143 'HAVE_MACH_O_NLIST_H',
146 # Like ld, dump_syms needs to operate on enough data that it may
147 # actually need to be able to address more than 4GB. Use x86_64.
148 # Don't worry! An x86_64 dump_syms is perfectly able to dump
154 # The DWARF utilities require -funsigned-char.
155 'GCC_CHAR_IS_UNSIGNED_CHAR': 'YES',
157 # dwarf2reader.cc uses dynamic_cast.
158 'GCC_ENABLE_CPP_RTTI': 'YES',
162 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
168 # dump_syms crashes when built at -O1, -O2, and -O3. It does
169 # not crash at -Os. To play it safe, dump_syms is always built
170 # at -O0 until this can be sorted out.
171 # http://code.google.com/p/google-breakpad/issues/detail?id=329
172 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
178 'target_name': 'symupload',
179 'type': 'executable',
184 'src/common/mac/HTTPMultipartUpload.m',
185 'src/tools/mac/symupload/symupload.m',
189 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
194 'target_name': 'breakpad',
195 'type': 'static_library',
197 'breakpad_utilities',
199 'crash_report_sender',
202 'src/client/apple/Framework',
204 'direct_dependent_settings': {
206 'src/client/apple/Framework',
210 'USE_PROTECTED_ALLOCATIONS=1',
213 'src/client/mac/crash_generation/crash_generation_client.cc',
214 'src/client/mac/crash_generation/crash_generation_client.h',
215 'src/client/mac/handler/protected_memory_allocator.cc',
216 'src/client/mac/handler/exception_handler.cc',
217 'src/client/mac/Framework/Breakpad.mm',
218 'src/client/mac/Framework/OnDemandServer.mm',
223 [ 'OS=="linux" or OS=="android"', {
230 # Tools needed for archiving build symbols.
231 ['linux_breakpad==1', {
234 'target_name': 'minidump_stackwalk',
235 'type': 'executable',
237 # This uses the system libcurl, so don't use the default 32-bit
238 # compile flags when building on a 64-bit machine.
240 'host_arch': '<!(uname -m)',
243 ['host_arch=="x86_64"', {
244 'cflags!': ['-m32', '-march=pentium4', '-msse2',
246 'ldflags!': ['-m32'],
248 'include_dirs!': ['/usr/include32'],
251 'toolsets': [ 'host' ],
260 'src/google_breakpad/processor/call_stack.h',
261 'src/google_breakpad/processor/stack_frame_symbolizer.h',
262 'src/processor/minidump_stackwalk.cc',
263 'src/processor/stackwalker.cc',
264 'src/processor/stackwalker.h',
265 'src/processor/basic_code_module.h',
266 'src/processor/basic_code_modules.cc',
267 'src/processor/basic_code_modules.h',
268 'src/processor/basic_source_line_resolver.cc',
269 'src/processor/basic_source_line_resolver.h',
270 'src/processor/binarystream.cc',
271 'src/processor/binarystream.h',
272 'src/processor/call_stack.cc',
273 'src/processor/cfi_frame_info.cc',
274 'src/processor/cfi_frame_info.h',
275 'src/processor/disassembler_x86.cc',
276 'src/processor/disassembler_x86.h',
277 'src/processor/exploitability.cc',
278 'src/processor/exploitability.h',
279 'src/processor/exploitability_win.cc',
280 'src/processor/exploitability_win.h',
281 'src/processor/logging.cc',
282 'src/processor/logging.h',
283 'src/processor/minidump.cc',
284 'src/processor/minidump.h',
285 'src/processor/minidump_processor.cc',
286 'src/processor/minidump_processor.h',
287 'src/processor/pathname_stripper.cc',
288 'src/processor/pathname_stripper.h',
289 'src/processor/process_state.cc',
290 'src/processor/process_state.h',
291 'src/processor/simple_symbol_supplier.cc',
292 'src/processor/simple_symbol_supplier.h',
293 'src/processor/source_line_resolver_base.cc',
294 'src/processor/source_line_resolver_base.h',
295 'src/processor/stack_frame_symbolizer.cc',
296 'src/processor/stackwalker.cc',
297 'src/processor/stackwalker.h',
298 'src/processor/stackwalker_amd64.cc',
299 'src/processor/stackwalker_amd64.h',
300 'src/processor/stackwalker_arm.cc',
301 'src/processor/stackwalker_arm.h',
302 'src/processor/stackwalker_ppc.cc',
303 'src/processor/stackwalker_ppc.h',
304 'src/processor/stackwalker_sparc.cc',
305 'src/processor/stackwalker_sparc.h',
306 'src/processor/stackwalker_x86.cc',
307 'src/processor/stackwalker_x86.h',
308 'src/processor/tokenize.cc',
309 'src/processor/tokenize.h',
311 'src/third_party/libdisasm/ia32_implicit.c',
312 'src/third_party/libdisasm/ia32_implicit.h',
313 'src/third_party/libdisasm/ia32_insn.c',
314 'src/third_party/libdisasm/ia32_insn.h',
315 'src/third_party/libdisasm/ia32_invariant.c',
316 'src/third_party/libdisasm/ia32_invariant.h',
317 'src/third_party/libdisasm/ia32_modrm.c',
318 'src/third_party/libdisasm/ia32_modrm.h',
319 'src/third_party/libdisasm/ia32_opcode_tables.c',
320 'src/third_party/libdisasm/ia32_opcode_tables.h',
321 'src/third_party/libdisasm/ia32_operand.c',
322 'src/third_party/libdisasm/ia32_operand.h',
323 'src/third_party/libdisasm/ia32_reg.c',
324 'src/third_party/libdisasm/ia32_reg.h',
325 'src/third_party/libdisasm/ia32_settings.c',
326 'src/third_party/libdisasm/ia32_settings.h',
327 'src/third_party/libdisasm/libdis.h',
328 'src/third_party/libdisasm/qword.h',
329 'src/third_party/libdisasm/x86_disasm.c',
330 'src/third_party/libdisasm/x86_format.c',
331 'src/third_party/libdisasm/x86_imm.c',
332 'src/third_party/libdisasm/x86_imm.h',
333 'src/third_party/libdisasm/x86_insn.c',
334 'src/third_party/libdisasm/x86_misc.c',
335 'src/third_party/libdisasm/x86_operand_list.c',
336 'src/third_party/libdisasm/x86_operand_list.h',
340 'target_name': 'minidump_dump',
341 'type': 'executable',
342 # This uses the system libcurl, so don't use the default 32-bit
343 # compile flags when building on a 64-bit machine.
345 'host_arch': '<!(uname -m)',
348 ['host_arch=="x86_64"', {
349 'cflags!': ['-m32', '-march=pentium4', '-msse2',
351 'ldflags!': ['-m32'],
353 'include_dirs!': ['/usr/include32'],
356 'toolsets': [ 'host' ],
360 'src/processor/minidump_dump.cc',
361 'src/processor/basic_code_module.h',
362 'src/processor/basic_code_modules.h',
363 'src/processor/basic_code_modules.cc',
364 'src/processor/logging.h',
365 'src/processor/logging.cc',
366 'src/processor/minidump.h',
367 'src/processor/minidump.cc',
368 'src/processor/pathname_stripper.h',
369 'src/processor/pathname_stripper.cc',
378 'target_name': 'symupload',
379 'type': 'executable',
381 # This uses the system libcurl, so don't use the default 32-bit
382 # compile flags when building on a 64-bit machine.
384 'host_arch': '<!(uname -m)',
387 ['host_arch=="x86_64"', {
388 'cflags!': ['-m32', '-march=pentium4', '-msse2',
390 'ldflags!': ['-m32'],
392 'include_dirs!': ['/usr/include32'],
395 'toolsets': [ 'host' ],
400 'src/tools/linux/symupload/sym_upload.cc',
401 'src/common/linux/http_upload.cc',
402 'src/common/linux/http_upload.h',
415 'target_name': 'dump_syms',
416 'type': 'executable',
419 'toolsets': [ 'host' ],
423 # dwarf2reader.cc uses dynamic_cast. Because we don't typically
424 # don't support RTTI, we enable it for this single target. Since
425 # dump_syms doesn't share any object files with anything else,
426 # this doesn't end up polluting Chrome itself.
427 'cflags_cc!': ['-fno-rtti'],
430 'src/common/dwarf/bytereader.cc',
431 'src/common/dwarf_cfi_to_module.cc',
432 'src/common/dwarf_cfi_to_module.h',
433 'src/common/dwarf_cu_to_module.cc',
434 'src/common/dwarf_cu_to_module.h',
435 'src/common/dwarf/dwarf2diehandler.cc',
436 'src/common/dwarf/dwarf2reader.cc',
437 'src/common/dwarf_line_to_module.cc',
438 'src/common/dwarf_line_to_module.h',
439 'src/common/language.cc',
440 'src/common/language.h',
441 'src/common/linux/dump_symbols.cc',
442 'src/common/linux/dump_symbols.h',
443 'src/common/linux/elf_symbols_to_module.cc',
444 'src/common/linux/elf_symbols_to_module.h',
445 'src/common/linux/elfutils.cc',
446 'src/common/linux/elfutils.h',
447 'src/common/linux/file_id.cc',
448 'src/common/linux/file_id.h',
449 'src/common/linux/linux_libc_support.cc',
450 'src/common/linux/linux_libc_support.h',
451 'src/common/linux/memory_mapped_file.cc',
452 'src/common/linux/memory_mapped_file.h',
453 'src/common/linux/guid_creator.h',
454 'src/common/module.cc',
455 'src/common/module.h',
456 'src/common/stabs_reader.cc',
457 'src/common/stabs_reader.h',
458 'src/common/stabs_to_module.cc',
459 'src/common/stabs_to_module.h',
460 'src/tools/linux/dump_syms/dump_syms.cc',
463 # Breakpad rev 583 introduced this flag.
464 # Using this define, stabs_reader.h will include a.out.h to
480 'target_name': 'breakpad_client',
481 'type': 'static_library',
484 'src/client/linux/crash_generation/crash_generation_client.cc',
485 'src/client/linux/crash_generation/crash_generation_client.h',
486 'src/client/linux/handler/exception_handler.cc',
487 'src/client/linux/handler/exception_handler.h',
488 'src/client/linux/handler/minidump_descriptor.cc',
489 'src/client/linux/handler/minidump_descriptor.h',
490 'src/client/linux/log/log.cc',
491 'src/client/linux/log/log.h',
492 'src/client/linux/minidump_writer/directory_reader.h',
493 'src/client/linux/minidump_writer/line_reader.h',
494 'src/client/linux/minidump_writer/linux_core_dumper.cc',
495 'src/client/linux/minidump_writer/linux_core_dumper.h',
496 'src/client/linux/minidump_writer/linux_dumper.cc',
497 'src/client/linux/minidump_writer/linux_dumper.h',
498 'src/client/linux/minidump_writer/linux_ptrace_dumper.cc',
499 'src/client/linux/minidump_writer/linux_ptrace_dumper.h',
500 'src/client/linux/minidump_writer/minidump_writer.cc',
501 'src/client/linux/minidump_writer/minidump_writer.h',
502 'src/client/minidump_file_writer-inl.h',
503 'src/client/minidump_file_writer.cc',
504 'src/client/minidump_file_writer.h',
505 'src/common/convert_UTF.c',
506 'src/common/convert_UTF.h',
507 'src/common/linux/elf_core_dump.cc',
508 'src/common/linux/elf_core_dump.h',
509 'src/common/linux/elfutils.cc',
510 'src/common/linux/elfutils.h',
511 'src/common/linux/file_id.cc',
512 'src/common/linux/file_id.h',
513 'src/common/linux/google_crashdump_uploader.cc',
514 'src/common/linux/google_crashdump_uploader.h',
515 'src/common/linux/guid_creator.cc',
516 'src/common/linux/guid_creator.h',
517 'src/common/linux/libcurl_wrapper.cc',
518 'src/common/linux/libcurl_wrapper.h',
519 'src/common/linux/linux_libc_support.cc',
520 'src/common/linux/linux_libc_support.h',
521 'src/common/linux/memory_mapped_file.cc',
522 'src/common/linux/memory_mapped_file.h',
523 'src/common/linux/safe_readlink.cc',
524 'src/common/linux/safe_readlink.h',
525 'src/common/memory.h',
526 'src/common/string_conversion.cc',
527 'src/common/string_conversion.h',
531 # Android NDK toolchain doesn't support -mimplicit-it=always
532 ['target_arch=="arm" and OS!="android"', {
533 'cflags': ['-Wa,-mimplicit-it=always'],
535 ['target_arch=="arm" and chromeos==1', {
536 # Avoid running out of registers in
537 # linux_syscall_support.h:sys_clone()'s inline assembly.
542 'src/common/android/include',
544 'direct_dependent_settings': {
546 'src/common/android/include',
550 'src/common/android/breakpad_getcontext.S',
564 'src/third_party/linux/include',
570 # Breakpad r693 uses some files from src/processor in unit tests.
571 'target_name': 'breakpad_processor_support',
572 'type': 'static_library',
575 'src/processor/basic_code_modules.cc',
576 'src/processor/basic_code_modules.h',
577 'src/processor/logging.cc',
578 'src/processor/logging.h',
579 'src/processor/minidump.cc',
580 'src/processor/pathname_stripper.cc',
581 'src/processor/pathname_stripper.h',
582 'src/processor/scoped_ptr.h',
588 'src/third_party/linux/include',
594 'target_name': 'breakpad_unittests',
595 'type': 'executable',
597 '../testing/gtest.gyp:gtest',
598 '../testing/gtest.gyp:gtest_main',
599 '../testing/gmock.gyp:gmock',
601 'breakpad_processor_support',
602 'linux_dumper_unittest_helper',
606 'linux/breakpad_googletest_includes.h',
607 'src/client/linux/handler/exception_handler_unittest.cc',
608 'src/client/linux/minidump_writer/directory_reader_unittest.cc',
609 'src/client/linux/minidump_writer/line_reader_unittest.cc',
610 'src/client/linux/minidump_writer/linux_core_dumper_unittest.cc',
611 'src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc',
612 'src/client/linux/minidump_writer/minidump_writer_unittest.cc',
613 'src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc',
614 'src/common/linux/elf_core_dump_unittest.cc',
615 'src/common/linux/file_id_unittest.cc',
616 'src/common/linux/linux_libc_support_unittest.cc',
617 'src/common/linux/synth_elf.cc',
618 'src/common/linux/tests/crash_generator.cc',
619 'src/common/linux/tests/crash_generator.h',
620 'src/common/memory_range.h',
621 'src/common/memory_unittest.cc',
622 'src/common/test_assembler.cc',
623 'src/common/tests/file_utils.cc',
624 'src/common/tests/file_utils.h',
625 'src/tools/linux/md2core/minidump_memory_range.h',
626 'src/tools/linux/md2core/minidump_memory_range_unittest.cc',
630 'linux', # Use our copy of breakpad_googletest_includes.h
638 # See http://crbug.com/138571#c18
647 'src/common/android/include',
653 'target_name': 'linux_dumper_unittest_helper',
654 'type': 'executable',
656 'breakpad_processor_support',
659 'src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc',
668 'target_name': 'generate_test_dump',
669 'type': 'executable',
672 'linux/generate-test-dump.cc',
685 'target_name': 'minidump-2-core',
686 'type': 'executable',
689 'src/tools/linux/md2core/minidump-2-core.cc'
702 'target_name': 'core-2-minidump',
703 'type': 'executable',
706 'src/tools/linux/core2md/core2md.cc'
722 'ninja_output_dir': 'ninja-breakpad',
724 '<(DEPTH)/xcodebuild/<(ninja_output_dir)/<(CONFIGURATION_NAME)',
726 # Generation is done via two actions: (1) compiling the executable with
727 # ninja, and (2) copying the executable into a location that is shared
728 # with other projects. These actions are separated into two targets in
729 # order to be able to specify that the second action should not run until
730 # the first action finishes (since the ordering of multiple actions in
731 # one target is defined only by inputs and outputs, and it's impossible
732 # to set correct inputs for the ninja build, so setting all the inputs
733 # and outputs isn't an option).
736 'target_name': 'compile_breakpad_utilities',
741 'breakpad/breakpad.gyp',
744 'includes': ['../build/ios/mac_build.gypi'],
747 'action_name': 'compile breakpad utilities',
755 'message': 'Generating the breakpad executables',
760 'target_name': 'breakpad_utilities',
763 'compile_breakpad_utilities',
767 'action_name': 'copy dump_syms',
769 '<(ninja_product_dir)/dump_syms',
772 '<(PRODUCT_DIR)/dump_syms',
776 '<(ninja_product_dir)/dump_syms',
777 '<(PRODUCT_DIR)/dump_syms',
781 'action_name': 'copy symupload',
783 '<(ninja_product_dir)/symupload',
786 '<(PRODUCT_DIR)/symupload',
790 '<(ninja_product_dir)/symupload',
791 '<(PRODUCT_DIR)/symupload',
797 'target_name': 'dump_syms',
800 'breakpad_utilities',
804 'target_name': 'symupload',
807 'breakpad_utilities',
811 'target_name': 'breakpad_client',
812 'type': 'static_library',
814 'src/client/ios/Breakpad.h',
815 'src/client/ios/Breakpad.mm',
816 'src/client/ios/BreakpadController.h',
817 'src/client/ios/BreakpadController.mm',
818 'src/client/ios/handler/ios_exception_minidump_generator.mm',
819 'src/client/ios/handler/ios_exception_minidump_generator.h',
820 'src/client/mac/crash_generation/ConfigFile.h',
821 'src/client/mac/crash_generation/ConfigFile.mm',
822 'src/client/mac/handler/breakpad_nlist_64.cc',
823 'src/client/mac/handler/breakpad_nlist_64.h',
824 'src/client/mac/handler/dynamic_images.cc',
825 'src/client/mac/handler/dynamic_images.h',
826 'src/client/mac/handler/protected_memory_allocator.cc',
827 'src/client/mac/handler/protected_memory_allocator.h',
828 'src/client/mac/handler/exception_handler.cc',
829 'src/client/mac/handler/exception_handler.h',
830 'src/client/mac/handler/minidump_generator.cc',
831 'src/client/mac/handler/minidump_generator.h',
832 'src/client/mac/sender/uploader.h',
833 'src/client/mac/sender/uploader.mm',
834 'src/client/minidump_file_writer.cc',
835 'src/client/minidump_file_writer.h',
836 'src/client/minidump_file_writer-inl.h',
837 'src/common/convert_UTF.c',
838 'src/common/convert_UTF.h',
839 'src/common/mac/file_id.cc',
840 'src/common/mac/file_id.h',
841 'src/common/mac/HTTPMultipartUpload.m',
842 'src/common/mac/macho_id.cc',
843 'src/common/mac/macho_id.h',
844 'src/common/mac/macho_utilities.cc',
845 'src/common/mac/macho_utilities.h',
846 'src/common/mac/macho_walker.cc',
847 'src/common/mac/macho_walker.h',
848 'src/common/mac/string_utilities.cc',
849 'src/common/mac/string_utilities.h',
850 'src/common/mac/SimpleStringDictionary.mm',
851 'src/common/mac/SimpleStringDictionary.h',
854 'src/common/string_conversion.cc',
855 'src/common/string_conversion.h',
856 'src/google_breakpad/common/minidump_format.h',
860 'src/client/mac/Framework',
863 '<(DEPTH)/third_party/GTM',
864 '<(DEPTH)/third_party/GTM/Foundation',
867 # Build the version of GTMLogger.m in third_party rather than the
868 # one in src/common/mac because the former catches all exceptions
869 # whereas the latter lets them propagate, which can cause odd
872 '<(DEPTH)/third_party/GTM/Foundation/GTMLogger.h',
873 '<(DEPTH)/third_party/GTM/Foundation/GTMLogger.m',
876 '<(DEPTH)/third_party/GTM',
877 '<(DEPTH)/third_party/GTM/Foundation',