Port Android relocation packer to chromium build
[chromium-blink-merge.git] / breakpad / BUILD.gn
blob8103bb132c500ab971cc45c8257968f5ba9b2254
1 # Copyright 2014 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.
5 import("//testing/test.gni")
7 config("tools_config") {
8   include_dirs = [
9     "src",
10     "src/third_party",
11   ]
12   if (is_android) {
13     defines = [ "__ANDROID__" ]
14   }
15   if (is_clang) {
16     cflags = [ "-Wno-tautological-constant-out-of-range-compare" ]
17   }
20 config("internal_config") {
21   include_dirs = [ "src" ]
22   defines = []
23   if (is_debug) {
24     # This is needed for GTMLogger to work correctly.
25     defines += [ "DEBUG" ]
26   }
27   if (is_android) {
28     defines += [ "__ANDROID__" ]
29   }
32 config("client_config") {
33   include_dirs = [ "src" ]
34   if (is_android) {
35     include_dirs += [ "src/common/android/include" ]
36   }
39 config("handler_config") {
40   include_dirs = [ "src" ]
43 config("sender_config") {
44   include_dirs = [ "src" ]
47 # {micro,mini}dump_stackwalk and minidump_dump are tool-type executables that do
48 # not build on iOS.
49 if (current_toolchain == host_toolchain && !is_win) {
50   # Contains the code shared by both {micro,mini}dump_stackwalk.
51   static_library("stackwalk_common") {
52     sources = [
53       "src/processor/basic_code_module.h",
54       "src/processor/basic_code_modules.cc",
55       "src/processor/basic_code_modules.h",
56       "src/processor/basic_source_line_resolver.cc",
57       "src/processor/binarystream.cc",
58       "src/processor/binarystream.h",
59       "src/processor/call_stack.cc",
60       "src/processor/cfi_frame_info.cc",
61       "src/processor/cfi_frame_info.h",
62       "src/processor/disassembler_x86.cc",
63       "src/processor/disassembler_x86.h",
64       "src/processor/dump_context.cc",
65       "src/processor/dump_object.cc",
66       "src/processor/logging.cc",
67       "src/processor/logging.h",
68       "src/processor/pathname_stripper.cc",
69       "src/processor/pathname_stripper.h",
70       "src/processor/process_state.cc",
71       "src/processor/simple_symbol_supplier.cc",
72       "src/processor/simple_symbol_supplier.h",
73       "src/processor/source_line_resolver_base.cc",
74       "src/processor/stack_frame_cpu.cc",
75       "src/processor/stack_frame_symbolizer.cc",
76       "src/processor/stackwalk_common.cc",
77       "src/processor/stackwalker.cc",
78       "src/processor/stackwalker_amd64.cc",
79       "src/processor/stackwalker_amd64.h",
80       "src/processor/stackwalker_arm.cc",
81       "src/processor/stackwalker_arm.h",
82       "src/processor/stackwalker_arm64.cc",
83       "src/processor/stackwalker_arm64.h",
84       "src/processor/stackwalker_mips.cc",
85       "src/processor/stackwalker_mips.h",
86       "src/processor/stackwalker_ppc.cc",
87       "src/processor/stackwalker_ppc.h",
88       "src/processor/stackwalker_ppc64.cc",
89       "src/processor/stackwalker_ppc64.h",
90       "src/processor/stackwalker_sparc.cc",
91       "src/processor/stackwalker_sparc.h",
92       "src/processor/stackwalker_x86.cc",
93       "src/processor/stackwalker_x86.h",
94       "src/processor/tokenize.cc",
95       "src/processor/tokenize.h",
97       # libdisasm
98       "src/third_party/libdisasm/ia32_implicit.c",
99       "src/third_party/libdisasm/ia32_implicit.h",
100       "src/third_party/libdisasm/ia32_insn.c",
101       "src/third_party/libdisasm/ia32_insn.h",
102       "src/third_party/libdisasm/ia32_invariant.c",
103       "src/third_party/libdisasm/ia32_invariant.h",
104       "src/third_party/libdisasm/ia32_modrm.c",
105       "src/third_party/libdisasm/ia32_modrm.h",
106       "src/third_party/libdisasm/ia32_opcode_tables.c",
107       "src/third_party/libdisasm/ia32_opcode_tables.h",
108       "src/third_party/libdisasm/ia32_operand.c",
109       "src/third_party/libdisasm/ia32_operand.h",
110       "src/third_party/libdisasm/ia32_reg.c",
111       "src/third_party/libdisasm/ia32_reg.h",
112       "src/third_party/libdisasm/ia32_settings.c",
113       "src/third_party/libdisasm/ia32_settings.h",
114       "src/third_party/libdisasm/libdis.h",
115       "src/third_party/libdisasm/qword.h",
116       "src/third_party/libdisasm/x86_disasm.c",
117       "src/third_party/libdisasm/x86_format.c",
118       "src/third_party/libdisasm/x86_imm.c",
119       "src/third_party/libdisasm/x86_imm.h",
120       "src/third_party/libdisasm/x86_insn.c",
121       "src/third_party/libdisasm/x86_misc.c",
122       "src/third_party/libdisasm/x86_operand_list.c",
123       "src/third_party/libdisasm/x86_operand_list.h",
124     ]
126     defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
128     configs -= [ "//build/config/compiler:chromium_code" ]
129     configs += [ "//build/config/compiler:no_chromium_code" ]
130     configs += [ ":tools_config" ]
131   }
133   executable("microdump_stackwalk") {
134     sources = [
135       "src/processor/microdump.cc",
136       "src/processor/microdump_processor.cc",
137       "src/processor/microdump_stackwalk.cc",
138     ]
140     deps = [
141       ":stackwalk_common",
142     ]
144     defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
146     configs -= [ "//build/config/compiler:chromium_code" ]
147     configs += [ "//build/config/compiler:no_chromium_code" ]
148     configs += [ ":tools_config" ]
149   }
151   executable("minidump_stackwalk") {
152     sources = [
153       "src/processor/exploitability.cc",
154       "src/processor/minidump.cc",
155       "src/processor/minidump_processor.cc",
156       "src/processor/minidump_stackwalk.cc",
157     ]
159     deps = [
160       ":stackwalk_common",
161     ]
163     defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
165     configs -= [ "//build/config/compiler:chromium_code" ]
166     configs += [ "//build/config/compiler:no_chromium_code" ]
167     configs += [ ":tools_config" ]
169     # Always want these files included regardless of platform.
170     set_sources_assignment_filter([])
171     sources += [
172       "src/processor/exploitability_linux.cc",
173       "src/processor/exploitability_linux.h",
174       "src/processor/exploitability_win.cc",
175       "src/processor/exploitability_win.h",
176     ]
177   }
179   executable("minidump_dump") {
180     sources = [
181       "src/processor/basic_code_module.h",
182       "src/processor/basic_code_modules.cc",
183       "src/processor/basic_code_modules.h",
184       "src/processor/dump_context.cc",
185       "src/processor/dump_object.cc",
186       "src/processor/logging.cc",
187       "src/processor/logging.h",
188       "src/processor/minidump.cc",
189       "src/processor/minidump_dump.cc",
190       "src/processor/pathname_stripper.cc",
191       "src/processor/pathname_stripper.h",
192     ]
194     configs += [ ":tools_config" ]
196     # There are some warnings in this code.
197     configs -= [ "//build/config/compiler:chromium_code" ]
198     configs += [ "//build/config/compiler:no_chromium_code" ]
199   }
202 # Mac --------------------------------------------------------------------------
204 if (current_toolchain == host_toolchain && is_mac) {
205   # TODO(GYP) This should be only 64-bit on Mac. From .gypi:
206   # Like ld, dump_syms needs to operate on enough data that it may
207   # actually need to be able to address more than 4GB. Use x86_64.
208   # Don't worry! An x86_64 dump_syms is perfectly able to dump
209   # 32-bit files.
210   executable("dump_syms") {
211     sources = [
212       "src/common/dwarf/bytereader.cc",
213       "src/common/dwarf/dwarf2diehandler.cc",
214       "src/common/dwarf/dwarf2reader.cc",
215       "src/common/dwarf_cfi_to_module.cc",
216       "src/common/dwarf_cu_to_module.cc",
217       "src/common/dwarf_line_to_module.cc",
218       "src/common/language.cc",
219       "src/common/mac/arch_utilities.cc",
220       "src/common/mac/arch_utilities.h",
221       "src/common/mac/dump_syms.mm",
222       "src/common/mac/file_id.cc",
223       "src/common/mac/macho_id.cc",
224       "src/common/mac/macho_reader.cc",
225       "src/common/mac/macho_utilities.cc",
226       "src/common/mac/macho_walker.cc",
227       "src/common/md5.cc",
228       "src/common/module.cc",
229       "src/common/stabs_reader.cc",
230       "src/common/stabs_to_module.cc",
231       "src/tools/mac/dump_syms/dump_syms_tool.mm",
232     ]
234     # For src/common/stabs_reader.h.
235     defines = [ "HAVE_MACH_O_NLIST_H" ]
236     include_dirs = [ "src/common/mac" ]
238     # The DWARF utilities require -funsigned-char.
239     cflags = [ "-funsigned-char" ]
241     configs += [ ":internal_config" ]
243     configs -= [ "//build/config/compiler:chromium_code" ]
244     configs += [ "//build/config/compiler:no_chromium_code" ]
246     # dwarf2reader.cc uses dynamic_cast.
247     configs -= [ "//build/config/compiler:no_rtti" ]
248     configs += [ "//build/config/compiler:rtti" ]
250     libs = [ "Foundation.framework" ]
252     if (!is_debug) {
253       # dump_syms crashes when built at -O1, -O2, and -O3.  It does
254       # not crash at -Os.  To play it safe, dump_syms is always built
255       # at -O0 until this can be sorted out.
256       # http://code.google.com/p/google-breakpad/issues/detail?id=329
257       configs -= [ "//build/config/compiler:optimize" ]
258       cflags += [ "-O0" ]
259     }
260   }
262   executable("symupload") {
263     sources = [
264       "src/common/mac/HTTPMultipartUpload.m",
265       "src/tools/mac/symupload/symupload.m",
266     ]
268     include_dirs = [ "src/common/mac" ]
270     libs = [ "Foundation.framework" ]
272     configs -= [ "//build/config/compiler:chromium_code" ]
273     configs += [ "//build/config/compiler:no_chromium_code" ]
274   }
277 if (is_mac) {
278   static_library("utilities") {
279     sources = [
280       "src/client/mac/crash_generation/ConfigFile.mm",
281       "src/client/mac/handler/breakpad_nlist_64.cc",
282       "src/client/mac/handler/dynamic_images.cc",
283       "src/client/mac/handler/minidump_generator.cc",
284       "src/client/minidump_file_writer.cc",
285       "src/common/convert_UTF.c",
286       "src/common/mac/MachIPC.mm",
287       "src/common/mac/arch_utilities.cc",
288       "src/common/mac/bootstrap_compat.cc",
289       "src/common/mac/file_id.cc",
290       "src/common/mac/launch_reporter.cc",
291       "src/common/mac/macho_id.cc",
292       "src/common/mac/macho_utilities.cc",
293       "src/common/mac/macho_walker.cc",
294       "src/common/mac/string_utilities.cc",
295       "src/common/md5.cc",
296       "src/common/simple_string_dictionary.cc",
297       "src/common/string_conversion.cc",
298     ]
300     configs += [ ":internal_config" ]
302     # There are some warnings in this code.
303     configs -= [ "//build/config/compiler:chromium_code" ]
304     configs += [ "//build/config/compiler:no_chromium_code" ]
305   }
307   executable("crash_inspector") {
308     sources = [
309       "src/client/mac/crash_generation/Inspector.mm",
310       "src/client/mac/crash_generation/InspectorMain.mm",
311     ]
313     # TODO(GYP): 'mac_real_dsym': 1,
315     include_dirs = [
316       "src/client/apple/Framework",
317       "src/common/mac",
318       "src",
319     ]
320     libs = [
321       "CoreServices.framework",
322       "Foundation.framework",
323     ]
325     deps = [
326       ":utilities",
327     ]
328   }
330   # TODO(GYP) this target has some mac_bundle_resources stuff.
331   # executable("crash_report_sender") {
332   # }
333   group("crash_report_sender") {
334   }
336   config("breakpad_config") {
337     include_dirs = [ "src/client/apple/Framework" ]
338   }
340   static_library("breakpad") {
341     sources = [
342       "src/client/mac/Framework/Breakpad.mm",
343       "src/client/mac/Framework/OnDemandServer.mm",
344       "src/client/mac/crash_generation/crash_generation_client.cc",
345       "src/client/mac/crash_generation/crash_generation_client.h",
346       "src/client/mac/handler/exception_handler.cc",
347       "src/client/mac/handler/protected_memory_allocator.cc",
348     ]
350     configs += [ ":internal_config" ]
351     public_configs = [ ":breakpad_config" ]
353     defines = [ "USE_PROTECTED_ALLOCATIONS=1" ]
354     include_dirs = [ "src/client/apple/Framework" ]
356     deps = [
357       ":utilities",
358       ":crash_inspector",
359       ":crash_report_sender",
360     ]
361   }
363   group("client") {
364     public_configs = [ ":client_config" ]
365   }
368 if (is_linux) {
369   executable("symupload") {
370     sources = [
371       "src/common/linux/http_upload.cc",
372       "src/common/linux/http_upload.h",
373       "src/tools/linux/symupload/sym_upload.cc",
374     ]
376     include_dirs = [
377       "src",
378       "src/third_party",
379     ]
381     configs += [ ":tools_config" ]
383     libs = [ "dl" ]
384   }
387 if (is_linux || is_android) {
388   if (current_toolchain == host_toolchain) {
389     # dump_syms is a host tool, so only compile it for the host system.
390     executable("dump_syms") {
391       sources = [
392         "src/common/dwarf/bytereader.cc",
393         "src/common/dwarf/dwarf2diehandler.cc",
394         "src/common/dwarf/dwarf2reader.cc",
395         "src/common/dwarf_cfi_to_module.cc",
396         "src/common/dwarf_cfi_to_module.h",
397         "src/common/dwarf_cu_to_module.cc",
398         "src/common/dwarf_cu_to_module.h",
399         "src/common/dwarf_line_to_module.cc",
400         "src/common/dwarf_line_to_module.h",
401         "src/common/language.cc",
402         "src/common/language.h",
403         "src/common/linux/crc32.cc",
404         "src/common/linux/crc32.h",
405         "src/common/linux/dump_symbols.cc",
406         "src/common/linux/dump_symbols.h",
407         "src/common/linux/elf_symbols_to_module.cc",
408         "src/common/linux/elf_symbols_to_module.h",
409         "src/common/linux/elfutils.cc",
410         "src/common/linux/elfutils.h",
411         "src/common/linux/file_id.cc",
412         "src/common/linux/file_id.h",
413         "src/common/linux/guid_creator.h",
414         "src/common/linux/linux_libc_support.cc",
415         "src/common/linux/linux_libc_support.h",
416         "src/common/linux/memory_mapped_file.cc",
417         "src/common/linux/memory_mapped_file.h",
418         "src/common/module.cc",
419         "src/common/module.h",
420         "src/common/stabs_reader.cc",
421         "src/common/stabs_reader.h",
422         "src/common/stabs_to_module.cc",
423         "src/common/stabs_to_module.h",
424         "src/tools/linux/dump_syms/dump_syms.cc",
425       ]
427       # There are some warnings in this code.
428       configs -= [ "//build/config/compiler:chromium_code" ]
429       configs += [ "//build/config/compiler:no_chromium_code" ]
431       # dwarf2reader.cc uses dynamic_cast. Because we don't typically
432       # don't support RTTI, we enable it for this single target. Since
433       # dump_syms doesn't share any object files with anything else,
434       # this doesn't end up polluting Chrome itself.
435       configs -= [ "//build/config/compiler:no_rtti" ]
436       configs += [ "//build/config/compiler:rtti" ]
438       # Breakpad rev 583 introduced this flag.
439       # Using this define, stabs_reader.h will include a.out.h to
440       # build on Linux.
441       defines = [ "HAVE_A_OUT_H" ]
443       include_dirs = [ "src" ]
444     }
445   }
447   static_library("client") {
448     # Want all these sources for both Linux and Android.
449     set_sources_assignment_filter([])
450     sources = [
451       "src/client/linux/crash_generation/crash_generation_client.cc",
452       "src/client/linux/crash_generation/crash_generation_client.h",
453       "src/client/linux/dump_writer_common/mapping_info.h",
454       "src/client/linux/dump_writer_common/seccomp_unwinder.cc",
455       "src/client/linux/dump_writer_common/seccomp_unwinder.h",
456       "src/client/linux/dump_writer_common/thread_info.cc",
457       "src/client/linux/dump_writer_common/thread_info.h",
458       "src/client/linux/dump_writer_common/ucontext_reader.cc",
459       "src/client/linux/dump_writer_common/ucontext_reader.h",
460       "src/client/linux/handler/exception_handler.cc",
461       "src/client/linux/handler/exception_handler.h",
462       "src/client/linux/handler/minidump_descriptor.cc",
463       "src/client/linux/handler/minidump_descriptor.h",
464       "src/client/linux/log/log.cc",
465       "src/client/linux/log/log.h",
466       "src/client/linux/microdump_writer/microdump_writer.cc",
467       "src/client/linux/microdump_writer/microdump_writer.h",
468       "src/client/linux/minidump_writer/cpu_set.h",
469       "src/client/linux/minidump_writer/directory_reader.h",
470       "src/client/linux/minidump_writer/line_reader.h",
471       "src/client/linux/minidump_writer/linux_core_dumper.cc",
472       "src/client/linux/minidump_writer/linux_core_dumper.h",
473       "src/client/linux/minidump_writer/linux_dumper.cc",
474       "src/client/linux/minidump_writer/linux_dumper.h",
475       "src/client/linux/minidump_writer/linux_ptrace_dumper.cc",
476       "src/client/linux/minidump_writer/linux_ptrace_dumper.h",
477       "src/client/linux/minidump_writer/minidump_writer.cc",
478       "src/client/linux/minidump_writer/minidump_writer.h",
479       "src/client/linux/minidump_writer/proc_cpuinfo_reader.h",
480       "src/client/minidump_file_writer-inl.h",
481       "src/client/minidump_file_writer.cc",
482       "src/client/minidump_file_writer.h",
483       "src/common/convert_UTF.c",
484       "src/common/convert_UTF.h",
485       "src/common/linux/elf_core_dump.cc",
486       "src/common/linux/elf_core_dump.h",
487       "src/common/linux/elfutils.cc",
488       "src/common/linux/elfutils.h",
489       "src/common/linux/file_id.cc",
490       "src/common/linux/file_id.h",
491       "src/common/linux/google_crashdump_uploader.cc",
492       "src/common/linux/google_crashdump_uploader.h",
493       "src/common/linux/guid_creator.cc",
494       "src/common/linux/guid_creator.h",
495       "src/common/linux/libcurl_wrapper.cc",
496       "src/common/linux/libcurl_wrapper.h",
497       "src/common/linux/linux_libc_support.cc",
498       "src/common/linux/linux_libc_support.h",
499       "src/common/linux/memory_mapped_file.cc",
500       "src/common/linux/memory_mapped_file.h",
501       "src/common/linux/safe_readlink.cc",
502       "src/common/linux/safe_readlink.h",
503       "src/common/memory.h",
504       "src/common/simple_string_dictionary.cc",
505       "src/common/simple_string_dictionary.h",
506       "src/common/string_conversion.cc",
507       "src/common/string_conversion.h",
508     ]
510     configs -= [ "//build/config/compiler:chromium_code" ]
511     configs += [ "//build/config/compiler:no_chromium_code" ]
512     public_configs = [ ":client_config" ]
514     if (current_cpu == "arm" && is_chromeos) {
515       # Avoid running out of registers in
516       # linux_syscall_support.h:sys_clone()'s inline assembly.
517       cflags = [ "-marm" ]
518     }
520     if (is_android) {
521       sources += [ "src/common/android/breakpad_getcontext.S" ]
522     }
524     libs = [ "dl" ]
526     include_dirs = [
527       ".",
528       "src",
529       "src/client",
530       "src/third_party/linux/include",
531     ]
532   }
534   static_library("processor_support") {
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/dump_context.cc",
540       "src/processor/dump_object.cc",
541       "src/processor/logging.cc",
542       "src/processor/logging.h",
543       "src/processor/minidump.cc",
544       "src/processor/pathname_stripper.cc",
545       "src/processor/pathname_stripper.h",
546     ]
548     include_dirs = [
549       "src",
550       "src/client",
551       "src/third_party/linux/include",
552       ".",
553     ]
555     # There are some warnings in this code.
556     configs -= [ "//build/config/compiler:chromium_code" ]
557     configs += [ "//build/config/compiler:no_chromium_code" ]
558   }
561 if (is_linux) {
562   test("breakpad_unittests") {
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/auto_testfile.h",
579       "src/common/linux/tests/crash_generator.cc",
580       "src/common/linux/tests/crash_generator.h",
581       "src/common/memory_range.h",
582       "src/common/memory_unittest.cc",
583       "src/common/simple_string_dictionary_unittest.cc",
584       "src/common/test_assembler.cc",
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     deps = [
592       ":client",
593       ":processor_support",
594       ":linux_dumper_unittest_helper",
595       "//testing/gtest",
596       "//testing/gtest:gtest_main",
597       "//testing/gmock",
598     ]
600     include_dirs = [
601       "linux",  # Use our copy of breakpad_googletest_includes.h
602       "src",
603       ".",
604     ]
606     # There are some warnings in this code.
607     configs -= [ "//build/config/compiler:chromium_code" ]
608     configs += [ "//build/config/compiler:no_chromium_code" ]
610     if (is_clang) {
611       # See http://crbug.com/138571#c18
612       cflags = [ "-Wno-unused-value" ]
613     }
615     if (is_android) {
616       sources += [ "src/common/android/breakpad_getcontext_unittest.cc" ]
617       libs = [ "log" ]
618       include_dirs += [ "src/common/android/include" ]
619     }
620   }
622   executable("linux_dumper_unittest_helper") {
623     testonly = true
624     sources = [
625       "src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc",
626     ]
627     deps = [
628       ":processor_support",
629     ]
631     include_dirs = [ "src" ]
633     if (current_cpu == "mipsel" && is_android) {
634       include_dirs += [ "src/common/android/include" ]
635     }
636   }
638   executable("generate_test_dump") {
639     testonly = true
640     sources = [
641       "linux/generate-test-dump.cc",
642     ]
644     # This file has an unused variable warning.
645     configs -= [ "//build/config/compiler:chromium_code" ]
646     configs += [ "//build/config/compiler:no_chromium_code" ]
648     deps = [
649       ":client",
650     ]
652     include_dirs = [ "src" ]
654     if (is_android) {
655       libs = [ "log" ]
656       include_dirs += [ "src/common/android/include" ]
657     }
658   }
660   executable("minidump-2-core") {
661     sources = [
662       "src/tools/linux/md2core/minidump-2-core.cc",
663     ]
665     include_dirs = [ "src" ]
667     deps = [
668       ":client",
669     ]
670   }
672   executable("core-2-minidump") {
673     sources = [
674       "src/tools/linux/core2md/core2md.cc",
675     ]
677     deps = [
678       ":client",
679     ]
681     include_dirs = [ "src" ]
682   }
685 if (is_ios) {
686   static_library("client") {
687     sources = [
688       "src/client/ios/Breakpad.h",
689       "src/client/ios/Breakpad.mm",
690       "src/client/ios/BreakpadController.h",
691       "src/client/ios/BreakpadController.mm",
692       "src/client/ios/handler/ios_exception_minidump_generator.h",
693       "src/client/ios/handler/ios_exception_minidump_generator.mm",
694       "src/client/mac/crash_generation/ConfigFile.h",
695       "src/client/mac/crash_generation/ConfigFile.mm",
696       "src/client/mac/handler/breakpad_nlist_64.cc",
697       "src/client/mac/handler/breakpad_nlist_64.h",
698       "src/client/mac/handler/dynamic_images.cc",
699       "src/client/mac/handler/dynamic_images.h",
700       "src/client/mac/handler/exception_handler.cc",
701       "src/client/mac/handler/exception_handler.h",
702       "src/client/mac/handler/minidump_generator.cc",
703       "src/client/mac/handler/minidump_generator.h",
704       "src/client/mac/handler/protected_memory_allocator.cc",
705       "src/client/mac/handler/protected_memory_allocator.h",
706       "src/client/mac/sender/uploader.h",
707       "src/client/mac/sender/uploader.mm",
708       "src/client/minidump_file_writer-inl.h",
709       "src/client/minidump_file_writer.cc",
710       "src/client/minidump_file_writer.h",
711       "src/common/convert_UTF.c",
712       "src/common/convert_UTF.h",
713       "src/common/mac/HTTPMultipartUpload.m",
714       "src/common/mac/file_id.cc",
715       "src/common/mac/file_id.h",
716       "src/common/mac/macho_id.cc",
717       "src/common/mac/macho_id.h",
718       "src/common/mac/macho_utilities.cc",
719       "src/common/mac/macho_utilities.h",
720       "src/common/mac/macho_walker.cc",
721       "src/common/mac/macho_walker.h",
722       "src/common/mac/string_utilities.cc",
723       "src/common/mac/string_utilities.h",
724       "src/common/md5.cc",
725       "src/common/md5.h",
726       "src/common/simple_string_dictionary.cc",
727       "src/common/simple_string_dictionary.h",
728       "src/common/string_conversion.cc",
729       "src/common/string_conversion.h",
730       "src/google_breakpad/common/minidump_format.h",
731     ]
733     include_dirs = [
734       "src",
735       "src/client/mac/Framework",
736       "src/common/mac",
737     ]
738   }
739   # TODO(GYP) There is some XCode-only targets like ninja-breakpad.
742 if (is_win) {
743   group("client") {
744     public_configs = [ ":client_config" ]
745   }
747   source_set("breakpad_handler") {
748     configs += [ ":handler_config" ]
749     if (is_win) {
750       public_configs = [ ":handler_config" ]
751     }
753     defines = [ "BREAKPAD_NO_TERMINATE_THREAD" ]
755     sources = [
756       "src/client/windows/crash_generation/client_info.cc",
757       "src/client/windows/crash_generation/client_info.h",
758       "src/client/windows/crash_generation/crash_generation_client.cc",
759       "src/client/windows/crash_generation/crash_generation_client.h",
760       "src/client/windows/crash_generation/crash_generation_server.cc",
761       "src/client/windows/crash_generation/crash_generation_server.h",
762       "src/client/windows/crash_generation/minidump_generator.cc",
763       "src/client/windows/crash_generation/minidump_generator.h",
764       "src/client/windows/handler/exception_handler.cc",
765       "src/client/windows/handler/exception_handler.h",
766       "src/common/windows/guid_string.cc",
767       "src/common/windows/guid_string.h",
768       "src/common/windows/string_utils-inl.h",
769       "src/google_breakpad/common/minidump_format.h",
770     ]
771   }
773   source_set("breakpad_sender") {
774     sources = [
775       "src/client/windows/sender/crash_report_sender.cc",
776       "src/client/windows/sender/crash_report_sender.h",
777       "src/common/windows/http_upload.cc",
778       "src/common/windows/http_upload.h",
779     ]
780     configs += [ ":sender_config" ]
781     public_configs = [ ":sender_config" ]
782   }