Instrumenting Predictor to locate the source of jankiness.
[chromium-blink-merge.git] / breakpad / BUILD.gn
blobbae85d6824fbc78d73e37045b810be245cb226aa
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 config("tools_config") {
6   include_dirs = [ "src", "src/third_party" ]
7   if (is_android) {
8     defines = [ "__ANDROID__" ]
9   }
10   if (is_clang) {
11     cflags = [ "-Wno-tautological-constant-out-of-range-compare" ]
12   }
15 config("internal_config") {
16   include_dirs = [ "src" ]
17   defines = []
18   if (is_debug) {
19     # This is needed for GTMLogger to work correctly.
20     defines += [ "DEBUG" ]
21   }
22   if (is_android) {
23     defines += [ "__ANDROID__" ]
24   }
27 config("client_config") {
28   include_dirs = [ "src" ]
29   if (is_android) {
30     include_dirs += [ "src/common/android/include" ]
31   }
34 config("handler_config") {
35   include_dirs = [
36     "src",
37   ]
40 # {micro,mini}dump_stackwalk and minidump_dump are tool-type executables that do
41 # not build on iOS.
42 if (current_toolchain == host_toolchain && !is_win) {
43   # Contains the code shared by both {micro,mini}dump_stackwalk.
44   static_library("stackwalk_common") {
45     sources = [
46       "src/processor/basic_code_module.h",
47       "src/processor/basic_code_modules.cc",
48       "src/processor/basic_code_modules.h",
49       "src/processor/basic_source_line_resolver.cc",
50       "src/processor/binarystream.cc",
51       "src/processor/binarystream.h",
52       "src/processor/call_stack.cc",
53       "src/processor/cfi_frame_info.cc",
54       "src/processor/cfi_frame_info.h",
55       "src/processor/disassembler_x86.cc",
56       "src/processor/disassembler_x86.h",
57       "src/processor/dump_context.cc",
58       "src/processor/dump_object.cc",
59       "src/processor/logging.cc",
60       "src/processor/logging.h",
61       "src/processor/pathname_stripper.cc",
62       "src/processor/pathname_stripper.h",
63       "src/processor/process_state.cc",
64       "src/processor/simple_symbol_supplier.cc",
65       "src/processor/simple_symbol_supplier.h",
66       "src/processor/source_line_resolver_base.cc",
67       "src/processor/stack_frame_cpu.cc",
68       "src/processor/stack_frame_symbolizer.cc",
69       "src/processor/stackwalk_common.cc",
70       "src/processor/stackwalker.cc",
71       "src/processor/stackwalker_amd64.cc",
72       "src/processor/stackwalker_amd64.h",
73       "src/processor/stackwalker_arm.cc",
74       "src/processor/stackwalker_arm.h",
75       "src/processor/stackwalker_arm64.cc",
76       "src/processor/stackwalker_arm64.h",
77       "src/processor/stackwalker_mips.cc",
78       "src/processor/stackwalker_mips.h",
79       "src/processor/stackwalker_ppc.cc",
80       "src/processor/stackwalker_ppc.h",
81       "src/processor/stackwalker_ppc64.cc",
82       "src/processor/stackwalker_ppc64.h",
83       "src/processor/stackwalker_sparc.cc",
84       "src/processor/stackwalker_sparc.h",
85       "src/processor/stackwalker_x86.cc",
86       "src/processor/stackwalker_x86.h",
87       "src/processor/tokenize.cc",
88       "src/processor/tokenize.h",
89       # libdisasm
90       "src/third_party/libdisasm/ia32_implicit.c",
91       "src/third_party/libdisasm/ia32_implicit.h",
92       "src/third_party/libdisasm/ia32_insn.c",
93       "src/third_party/libdisasm/ia32_insn.h",
94       "src/third_party/libdisasm/ia32_invariant.c",
95       "src/third_party/libdisasm/ia32_invariant.h",
96       "src/third_party/libdisasm/ia32_modrm.c",
97       "src/third_party/libdisasm/ia32_modrm.h",
98       "src/third_party/libdisasm/ia32_opcode_tables.c",
99       "src/third_party/libdisasm/ia32_opcode_tables.h",
100       "src/third_party/libdisasm/ia32_operand.c",
101       "src/third_party/libdisasm/ia32_operand.h",
102       "src/third_party/libdisasm/ia32_reg.c",
103       "src/third_party/libdisasm/ia32_reg.h",
104       "src/third_party/libdisasm/ia32_settings.c",
105       "src/third_party/libdisasm/ia32_settings.h",
106       "src/third_party/libdisasm/libdis.h",
107       "src/third_party/libdisasm/qword.h",
108       "src/third_party/libdisasm/x86_disasm.c",
109       "src/third_party/libdisasm/x86_format.c",
110       "src/third_party/libdisasm/x86_imm.c",
111       "src/third_party/libdisasm/x86_imm.h",
112       "src/third_party/libdisasm/x86_insn.c",
113       "src/third_party/libdisasm/x86_misc.c",
114       "src/third_party/libdisasm/x86_operand_list.c",
115       "src/third_party/libdisasm/x86_operand_list.h",
116     ]
118     defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
120     configs -= [ "//build/config/compiler:chromium_code" ]
121     configs += [ "//build/config/compiler:no_chromium_code" ]
122     configs += [ ":tools_config" ]
123   }
125   executable("microdump_stackwalk") {
126     sources = [
127       "src/processor/microdump.cc",
128       "src/processor/microdump_processor.cc",
129       "src/processor/microdump_stackwalk.cc",
130     ]
132     deps = [ ":stackwalk_common" ]
134     defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
136     configs -= [ "//build/config/compiler:chromium_code" ]
137     configs += [ "//build/config/compiler:no_chromium_code" ]
138     configs += [ ":tools_config" ]
139   }
141   executable("minidump_stackwalk") {
142     sources = [
143       "src/processor/exploitability.cc",
144       "src/processor/minidump.cc",
145       "src/processor/minidump_processor.cc",
146       "src/processor/minidump_stackwalk.cc",
147     ]
149     deps = [ ":stackwalk_common" ]
151     defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
153     configs -= [ "//build/config/compiler:chromium_code" ]
154     configs += [ "//build/config/compiler:no_chromium_code" ]
155     configs += [ ":tools_config" ]
157     # Always want these files included regardless of platform.
158     set_sources_assignment_filter([])
159     sources += [
160       "src/processor/exploitability_linux.cc",
161       "src/processor/exploitability_linux.h",
162       "src/processor/exploitability_win.cc",
163       "src/processor/exploitability_win.h",
164     ]
165   }
167   executable("minidump_dump") {
168     sources = [
169       "src/processor/basic_code_module.h",
170       "src/processor/basic_code_modules.cc",
171       "src/processor/basic_code_modules.h",
172       "src/processor/dump_context.cc",
173       "src/processor/dump_object.cc",
174       "src/processor/logging.cc",
175       "src/processor/logging.h",
176       "src/processor/minidump.cc",
177       "src/processor/minidump_dump.cc",
178       "src/processor/pathname_stripper.cc",
179       "src/processor/pathname_stripper.h",
180     ]
182     configs += [ ":tools_config" ]
184     # There are some warnings in this code.
185     configs -= [ "//build/config/compiler:chromium_code" ]
186     configs += [ "//build/config/compiler:no_chromium_code" ]
187   }
190 # Mac --------------------------------------------------------------------------
192 if (current_toolchain == host_toolchain && is_mac) {
193   # TODO(GYP) This should be only 64-bit on Mac. From .gypi:
194   # Like ld, dump_syms needs to operate on enough data that it may
195   # actually need to be able to address more than 4GB. Use x86_64.
196   # Don't worry! An x86_64 dump_syms is perfectly able to dump
197   # 32-bit files.
198   executable("dump_syms") {
199     sources = [
200       "src/common/dwarf/bytereader.cc",
201       "src/common/dwarf_cfi_to_module.cc",
202       "src/common/dwarf_cu_to_module.cc",
203       "src/common/dwarf/dwarf2diehandler.cc",
204       "src/common/dwarf/dwarf2reader.cc",
205       "src/common/dwarf_line_to_module.cc",
206       "src/common/language.cc",
207       "src/common/mac/arch_utilities.cc",
208       "src/common/mac/arch_utilities.h",
209       "src/common/mac/dump_syms.mm",
210       "src/common/mac/file_id.cc",
211       "src/common/mac/macho_id.cc",
212       "src/common/mac/macho_reader.cc",
213       "src/common/mac/macho_utilities.cc",
214       "src/common/mac/macho_walker.cc",
215       "src/common/md5.cc",
216       "src/common/module.cc",
217       "src/common/stabs_reader.cc",
218       "src/common/stabs_to_module.cc",
219       "src/tools/mac/dump_syms/dump_syms_tool.mm",
220     ]
222     # For src/common/stabs_reader.h.
223     defines = [ "HAVE_MACH_O_NLIST_H" ]
224     include_dirs = [ "src/common/mac" ]
226     # The DWARF utilities require -funsigned-char.
227     cflags = [ "-funsigned-char" ]
229     configs += [ ":internal_config" ]
231     configs -= [ "//build/config/compiler:chromium_code" ]
232     configs += [ "//build/config/compiler:no_chromium_code" ]
234     # dwarf2reader.cc uses dynamic_cast.
235     configs -= [ "//build/config/compiler:no_rtti" ]
236     configs += [ "//build/config/compiler:rtti" ]
238     libs = [ "Foundation.framework" ]
240     if (!is_debug) {
241       # dump_syms crashes when built at -O1, -O2, and -O3.  It does
242       # not crash at -Os.  To play it safe, dump_syms is always built
243       # at -O0 until this can be sorted out.
244       # http://code.google.com/p/google-breakpad/issues/detail?id=329
245       configs -= [ "//build/config/compiler:optimize" ]
246       cflags += [ "-O0" ]
247     }
248   }
250   executable("symupload") {
251     sources = [
252       "src/common/mac/HTTPMultipartUpload.m",
253       "src/tools/mac/symupload/symupload.m",
254     ]
256     include_dirs = [
257       "src/common/mac"
258     ]
260     libs = [ "Foundation.framework" ]
262     configs -= [ "//build/config/compiler:chromium_code" ]
263     configs += [ "//build/config/compiler:no_chromium_code" ]
264   }
267 if (is_mac) {
268   static_library("utilities") {
269     sources = [
270       "src/client/mac/crash_generation/ConfigFile.mm",
271       "src/client/mac/handler/breakpad_nlist_64.cc",
272       "src/client/mac/handler/dynamic_images.cc",
273       "src/client/mac/handler/minidump_generator.cc",
274       "src/client/minidump_file_writer.cc",
275       "src/common/convert_UTF.c",
276       "src/common/mac/MachIPC.mm",
277       "src/common/mac/arch_utilities.cc",
278       "src/common/mac/bootstrap_compat.cc",
279       "src/common/mac/file_id.cc",
280       "src/common/mac/launch_reporter.cc",
281       "src/common/mac/macho_id.cc",
282       "src/common/mac/macho_utilities.cc",
283       "src/common/mac/macho_walker.cc",
284       "src/common/mac/string_utilities.cc",
285       "src/common/md5.cc",
286       "src/common/simple_string_dictionary.cc",
287       "src/common/string_conversion.cc",
288     ]
290     configs += [ ":internal_config" ]
292     # There are some warnings in this code.
293     configs -= [ "//build/config/compiler:chromium_code" ]
294     configs += [ "//build/config/compiler:no_chromium_code" ]
295   }
297   executable("crash_inspector") {
298     sources = [
299       "src/client/mac/crash_generation/Inspector.mm",
300       "src/client/mac/crash_generation/InspectorMain.mm",
301     ]
303     # TODO(GYP): 'mac_real_dsym': 1,
305     include_dirs = [
306       "src/client/apple/Framework",
307       "src/common/mac",
308       "src",
309     ]
310     libs = [
311       "CoreServices.framework",
312       "Foundation.framework",
313     ]
315     deps = [
316       ":utilities"
317     ]
318   }
320   # TODO(GYP) this target has some mac_bundle_resources stuff.
321   # executable("crash_report_sender") {
322   # }
323   group("crash_report_sender") {
324   }
326   config("breakpad_config") {
327     include_dirs = [ "src/client/apple/Framework" ]
328   }
330   static_library("breakpad") {
331     sources = [
332       "src/client/mac/crash_generation/crash_generation_client.cc",
333       "src/client/mac/crash_generation/crash_generation_client.h",
334       "src/client/mac/handler/protected_memory_allocator.cc",
335       "src/client/mac/handler/exception_handler.cc",
336       "src/client/mac/Framework/Breakpad.mm",
337       "src/client/mac/Framework/OnDemandServer.mm",
338     ]
340     configs += [ ":internal_config" ]
341     public_configs = [ ":breakpad_config" ]
343     defines = [ "USE_PROTECTED_ALLOCATIONS=1" ]
344     include_dirs = [
345       "src/client/apple/Framework",
346     ]
348     deps = [
349       ":utilities",
350       ":crash_inspector",
351       ":crash_report_sender",
352     ]
353   }
355   group("client") {
356     public_configs = [ ":client_config" ]
357   }
360 if (is_linux) {
361   executable("symupload") {
362     sources = [
363       "src/tools/linux/symupload/sym_upload.cc",
364       "src/common/linux/http_upload.cc",
365       "src/common/linux/http_upload.h",
366     ]
368     include_dirs = [
369       "src",
370       "src/third_party",
371     ]
373     configs += [ ":tools_config" ]
375     libs = [ "dl" ]
376   }
379 if (is_linux || is_android) {
380   if (current_toolchain == host_toolchain) {
381     # dump_syms is a host tool, so only compile it for the host system.
382     executable("dump_syms") {
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/crc32.cc",
396         "src/common/linux/crc32.h",
397         "src/common/linux/dump_symbols.cc",
398         "src/common/linux/dump_symbols.h",
399         "src/common/linux/elf_symbols_to_module.cc",
400         "src/common/linux/elf_symbols_to_module.h",
401         "src/common/linux/elfutils.cc",
402         "src/common/linux/elfutils.h",
403         "src/common/linux/file_id.cc",
404         "src/common/linux/file_id.h",
405         "src/common/linux/linux_libc_support.cc",
406         "src/common/linux/linux_libc_support.h",
407         "src/common/linux/memory_mapped_file.cc",
408         "src/common/linux/memory_mapped_file.h",
409         "src/common/linux/guid_creator.h",
410         "src/common/module.cc",
411         "src/common/module.h",
412         "src/common/stabs_reader.cc",
413         "src/common/stabs_reader.h",
414         "src/common/stabs_to_module.cc",
415         "src/common/stabs_to_module.h",
416         "src/tools/linux/dump_syms/dump_syms.cc",
417       ]
419       # There are some warnings in this code.
420       configs -= [ "//build/config/compiler:chromium_code" ]
421       configs += [ "//build/config/compiler:no_chromium_code" ]
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       configs -= [ "//build/config/compiler:no_rtti" ]
428       configs += [ "//build/config/compiler:rtti" ]
430       # Breakpad rev 583 introduced this flag.
431       # Using this define, stabs_reader.h will include a.out.h to
432       # build on Linux.
433       defines = [ "HAVE_A_OUT_H" ]
435       include_dirs = [ "src" ]
436     }
437   }
439   static_library("client") {
440     # Want all these sources for both Linux and Android.
441     set_sources_assignment_filter([])
442     sources = [
443       "src/client/linux/crash_generation/crash_generation_client.cc",
444       "src/client/linux/crash_generation/crash_generation_client.h",
445       "src/client/linux/dump_writer_common/mapping_info.h",
446       "src/client/linux/dump_writer_common/seccomp_unwinder.cc",
447       "src/client/linux/dump_writer_common/seccomp_unwinder.h",
448       "src/client/linux/dump_writer_common/thread_info.cc",
449       "src/client/linux/dump_writer_common/thread_info.h",
450       "src/client/linux/dump_writer_common/ucontext_reader.cc",
451       "src/client/linux/dump_writer_common/ucontext_reader.h",
452       "src/client/linux/handler/exception_handler.cc",
453       "src/client/linux/handler/exception_handler.h",
454       "src/client/linux/handler/minidump_descriptor.cc",
455       "src/client/linux/handler/minidump_descriptor.h",
456       "src/client/linux/log/log.cc",
457       "src/client/linux/log/log.h",
458       "src/client/linux/microdump_writer/microdump_writer.cc",
459       "src/client/linux/microdump_writer/microdump_writer.h",
460       "src/client/linux/minidump_writer/cpu_set.h",
461       "src/client/linux/minidump_writer/directory_reader.h",
462       "src/client/linux/minidump_writer/line_reader.h",
463       "src/client/linux/minidump_writer/linux_core_dumper.cc",
464       "src/client/linux/minidump_writer/linux_core_dumper.h",
465       "src/client/linux/minidump_writer/linux_dumper.cc",
466       "src/client/linux/minidump_writer/linux_dumper.h",
467       "src/client/linux/minidump_writer/linux_ptrace_dumper.cc",
468       "src/client/linux/minidump_writer/linux_ptrace_dumper.h",
469       "src/client/linux/minidump_writer/minidump_writer.cc",
470       "src/client/linux/minidump_writer/minidump_writer.h",
471       "src/client/linux/minidump_writer/proc_cpuinfo_reader.h",
472       "src/client/minidump_file_writer-inl.h",
473       "src/client/minidump_file_writer.cc",
474       "src/client/minidump_file_writer.h",
475       "src/common/convert_UTF.c",
476       "src/common/convert_UTF.h",
477       "src/common/linux/elf_core_dump.cc",
478       "src/common/linux/elf_core_dump.h",
479       "src/common/linux/elfutils.cc",
480       "src/common/linux/elfutils.h",
481       "src/common/linux/file_id.cc",
482       "src/common/linux/file_id.h",
483       "src/common/linux/google_crashdump_uploader.cc",
484       "src/common/linux/google_crashdump_uploader.h",
485       "src/common/linux/guid_creator.cc",
486       "src/common/linux/guid_creator.h",
487       "src/common/linux/libcurl_wrapper.cc",
488       "src/common/linux/libcurl_wrapper.h",
489       "src/common/linux/linux_libc_support.cc",
490       "src/common/linux/linux_libc_support.h",
491       "src/common/linux/memory_mapped_file.cc",
492       "src/common/linux/memory_mapped_file.h",
493       "src/common/linux/safe_readlink.cc",
494       "src/common/linux/safe_readlink.h",
495       "src/common/memory.h",
496       "src/common/simple_string_dictionary.cc",
497       "src/common/simple_string_dictionary.h",
498       "src/common/string_conversion.cc",
499       "src/common/string_conversion.h",
500     ]
502     configs -= [ "//build/config/compiler:chromium_code" ]
503     configs += [ "//build/config/compiler:no_chromium_code" ]
504     public_configs = [ ":client_config" ]
506     if (cpu_arch == "arm" && is_chromeos) {
507       # Avoid running out of registers in
508       # linux_syscall_support.h:sys_clone()'s inline assembly.
509       cflags = [ "-marm" ]
510     }
512     if (is_android) {
513       sources += [ "src/common/android/breakpad_getcontext.S" ]
514     }
516     libs = [ "dl" ]
518     include_dirs = [
519       ".",
520       "src",
521       "src/client",
522       "src/third_party/linux/include",
523     ]
524   }
526   static_library("processor_support") {
527     sources = [
528       "src/common/scoped_ptr.h",
529       "src/processor/basic_code_modules.cc",
530       "src/processor/basic_code_modules.h",
531       "src/processor/dump_context.cc",
532       "src/processor/dump_object.cc",
533       "src/processor/logging.cc",
534       "src/processor/logging.h",
535       "src/processor/minidump.cc",
536       "src/processor/pathname_stripper.cc",
537       "src/processor/pathname_stripper.h",
538     ]
540     include_dirs = [
541       "src",
542       "src/client",
543       "src/third_party/linux/include",
544       ".",
545     ]
547     # There are some warnings in this code.
548     configs -= [ "//build/config/compiler:chromium_code" ]
549     configs += [ "//build/config/compiler:no_chromium_code" ]
550   }
553 if (is_linux) {
554   test("breakpad_unittests") {
555     sources = [
556       "linux/breakpad_googletest_includes.h",
557       "src/client/linux/handler/exception_handler_unittest.cc",
558       "src/client/linux/minidump_writer/cpu_set_unittest.cc",
559       "src/client/linux/minidump_writer/directory_reader_unittest.cc",
560       "src/client/linux/minidump_writer/line_reader_unittest.cc",
561       "src/client/linux/minidump_writer/linux_core_dumper_unittest.cc",
562       "src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc",
563       "src/client/linux/minidump_writer/minidump_writer_unittest.cc",
564       "src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc",
565       "src/client/linux/minidump_writer/proc_cpuinfo_reader_unittest.cc",
566       "src/common/linux/elf_core_dump_unittest.cc",
567       "src/common/linux/file_id_unittest.cc",
568       "src/common/linux/linux_libc_support_unittest.cc",
569       "src/common/linux/synth_elf.cc",
570       "src/common/linux/tests/auto_testfile.h",
571       "src/common/linux/tests/crash_generator.cc",
572       "src/common/linux/tests/crash_generator.h",
573       "src/common/memory_range.h",
574       "src/common/memory_unittest.cc",
575       "src/common/simple_string_dictionary_unittest.cc",
576       "src/common/test_assembler.cc",
577       "src/common/tests/file_utils.cc",
578       "src/common/tests/file_utils.h",
579       "src/tools/linux/md2core/minidump_memory_range.h",
580       "src/tools/linux/md2core/minidump_memory_range_unittest.cc",
581     ]
583     deps = [
584       ":client",
585       ":processor_support",
586       ":linux_dumper_unittest_helper",
587       "//testing/gtest",
588       "//testing/gtest:gtest_main",
589       "//testing/gmock",
590     ]
592     include_dirs = [
593       "linux",  # Use our copy of breakpad_googletest_includes.h
594       "src",
595       ".",
596     ]
598     # There are some warnings in this code.
599     configs -= [ "//build/config/compiler:chromium_code" ]
600     configs += [ "//build/config/compiler:no_chromium_code" ]
602     if (is_clang) {
603       # See http://crbug.com/138571#c18
604       cflags = [ "-Wno-unused-value" ]
605     }
608     if (is_android) {
609       sources += [ "src/common/android/breakpad_getcontext_unittest.cc" ]
610       libs = [ "log" ]
611       include_dirs += [ "src/common/android/include" ]
612     }
613   }
615   executable("linux_dumper_unittest_helper") {
616     testonly = true
617     sources = [
618       "src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc",
619     ]
620     deps = [
621       ":processor_support",
622     ]
624     include_dirs = [
625       "src",
626     ]
628     if (cpu_arch == "mipsel" && is_android) {
629       include_dirs += [ "src/common/android/include" ]
630     }
631   }
634   executable("generate_test_dump") {
635     testonly = true
636     sources = [
637       "linux/generate-test-dump.cc",
638     ]
640     # This file has an unused variable warning.
641     configs -= [ "//build/config/compiler:chromium_code" ]
642     configs += [ "//build/config/compiler:no_chromium_code" ]
644     deps = [ ":client" ]
646     include_dirs = [ "src" ]
648     if (is_android) {
649       libs = [ "log" ]
650       include_dirs += [ "src/common/android/include" ]
651     }
652   }
654   executable("minidump-2-core") {
655     sources = [ "src/tools/linux/md2core/minidump-2-core.cc" ]
657     include_dirs = [ "src" ]
659     deps = [ ":client" ]
660   }
662   executable("core-2-minidump") {
663     sources = [
664       "src/tools/linux/core2md/core2md.cc",
665     ]
667     deps = [
668       ":client",
669     ]
671     include_dirs = [ "src" ]
672   }
675 if (is_ios) {
676   static_library("client") {
677     sources = [
678       "src/client/ios/Breakpad.h",
679       "src/client/ios/Breakpad.mm",
680       "src/client/ios/BreakpadController.h",
681       "src/client/ios/BreakpadController.mm",
682       "src/client/ios/handler/ios_exception_minidump_generator.mm",
683       "src/client/ios/handler/ios_exception_minidump_generator.h",
684       "src/client/mac/crash_generation/ConfigFile.h",
685       "src/client/mac/crash_generation/ConfigFile.mm",
686       "src/client/mac/handler/breakpad_nlist_64.cc",
687       "src/client/mac/handler/breakpad_nlist_64.h",
688       "src/client/mac/handler/dynamic_images.cc",
689       "src/client/mac/handler/dynamic_images.h",
690       "src/client/mac/handler/protected_memory_allocator.cc",
691       "src/client/mac/handler/protected_memory_allocator.h",
692       "src/client/mac/handler/exception_handler.cc",
693       "src/client/mac/handler/exception_handler.h",
694       "src/client/mac/handler/minidump_generator.cc",
695       "src/client/mac/handler/minidump_generator.h",
696       "src/client/mac/sender/uploader.h",
697       "src/client/mac/sender/uploader.mm",
698       "src/client/minidump_file_writer.cc",
699       "src/client/minidump_file_writer.h",
700       "src/client/minidump_file_writer-inl.h",
701       "src/common/convert_UTF.c",
702       "src/common/convert_UTF.h",
703       "src/common/mac/file_id.cc",
704       "src/common/mac/file_id.h",
705       "src/common/mac/HTTPMultipartUpload.m",
706       "src/common/mac/macho_id.cc",
707       "src/common/mac/macho_id.h",
708       "src/common/mac/macho_utilities.cc",
709       "src/common/mac/macho_utilities.h",
710       "src/common/mac/macho_walker.cc",
711       "src/common/mac/macho_walker.h",
712       "src/common/mac/string_utilities.cc",
713       "src/common/mac/string_utilities.h",
714       "src/common/md5.cc",
715       "src/common/md5.h",
716       "src/common/simple_string_dictionary.cc",
717       "src/common/simple_string_dictionary.h",
718       "src/common/string_conversion.cc",
719       "src/common/string_conversion.h",
720       "src/google_breakpad/common/minidump_format.h",
721     ]
723     include_dirs = [
724       "src",
725       "src/client/mac/Framework",
726       "src/common/mac",
727     ]
728   }
730   # TODO(GYP) There is some XCode-only targets like ninja-breakpad.
733 if (is_win) {
734   group("client") {
735     public_configs = [ ":client_config" ]
736   }
738   source_set("breakpad_handler") {
739     configs += [ ":handler_config" ]
740     if (is_win) {
741       public_configs = [ ":handler_config" ]
742     }
744     defines = [ "BREAKPAD_NO_TERMINATE_THREAD" ]
746     sources = [
747       "src/client/windows/crash_generation/client_info.cc",
748       "src/client/windows/crash_generation/client_info.h",
749       "src/client/windows/crash_generation/crash_generation_client.cc",
750       "src/client/windows/crash_generation/crash_generation_client.h",
751       "src/client/windows/crash_generation/crash_generation_server.cc",
752       "src/client/windows/crash_generation/crash_generation_server.h",
753       "src/client/windows/handler/exception_handler.cc",
754       "src/client/windows/handler/exception_handler.h",
755       "src/common/windows/guid_string.cc",
756       "src/common/windows/guid_string.h",
757       "src/google_breakpad/common/minidump_format.h",
758       "src/client/windows/crash_generation/minidump_generator.cc",
759       "src/client/windows/crash_generation/minidump_generator.h",
760       "src/common/windows/string_utils-inl.h",
761     ]
762   }