net: Remove 'libevent' from filenames.
[chromium-blink-merge.git] / breakpad / BUILD.gn
blobc075816a76ea5d3811974f40075aa7e811d6890d
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/call_stack.cc",
58       "src/processor/cfi_frame_info.cc",
59       "src/processor/cfi_frame_info.h",
60       "src/processor/disassembler_x86.cc",
61       "src/processor/disassembler_x86.h",
62       "src/processor/dump_context.cc",
63       "src/processor/dump_object.cc",
64       "src/processor/logging.cc",
65       "src/processor/logging.h",
66       "src/processor/pathname_stripper.cc",
67       "src/processor/pathname_stripper.h",
68       "src/processor/proc_maps_linux.cc",
69       "src/processor/process_state.cc",
70       "src/processor/simple_symbol_supplier.cc",
71       "src/processor/simple_symbol_supplier.h",
72       "src/processor/source_line_resolver_base.cc",
73       "src/processor/stack_frame_cpu.cc",
74       "src/processor/stack_frame_symbolizer.cc",
75       "src/processor/stackwalk_common.cc",
76       "src/processor/stackwalker.cc",
77       "src/processor/stackwalker_amd64.cc",
78       "src/processor/stackwalker_amd64.h",
79       "src/processor/stackwalker_arm.cc",
80       "src/processor/stackwalker_arm.h",
81       "src/processor/stackwalker_arm64.cc",
82       "src/processor/stackwalker_arm64.h",
83       "src/processor/stackwalker_mips.cc",
84       "src/processor/stackwalker_mips.h",
85       "src/processor/stackwalker_ppc.cc",
86       "src/processor/stackwalker_ppc.h",
87       "src/processor/stackwalker_ppc64.cc",
88       "src/processor/stackwalker_ppc64.h",
89       "src/processor/stackwalker_sparc.cc",
90       "src/processor/stackwalker_sparc.h",
91       "src/processor/stackwalker_x86.cc",
92       "src/processor/stackwalker_x86.h",
93       "src/processor/tokenize.cc",
94       "src/processor/tokenize.h",
96       # libdisasm
97       "src/third_party/libdisasm/ia32_implicit.c",
98       "src/third_party/libdisasm/ia32_implicit.h",
99       "src/third_party/libdisasm/ia32_insn.c",
100       "src/third_party/libdisasm/ia32_insn.h",
101       "src/third_party/libdisasm/ia32_invariant.c",
102       "src/third_party/libdisasm/ia32_invariant.h",
103       "src/third_party/libdisasm/ia32_modrm.c",
104       "src/third_party/libdisasm/ia32_modrm.h",
105       "src/third_party/libdisasm/ia32_opcode_tables.c",
106       "src/third_party/libdisasm/ia32_opcode_tables.h",
107       "src/third_party/libdisasm/ia32_operand.c",
108       "src/third_party/libdisasm/ia32_operand.h",
109       "src/third_party/libdisasm/ia32_reg.c",
110       "src/third_party/libdisasm/ia32_reg.h",
111       "src/third_party/libdisasm/ia32_settings.c",
112       "src/third_party/libdisasm/ia32_settings.h",
113       "src/third_party/libdisasm/libdis.h",
114       "src/third_party/libdisasm/qword.h",
115       "src/third_party/libdisasm/x86_disasm.c",
116       "src/third_party/libdisasm/x86_format.c",
117       "src/third_party/libdisasm/x86_imm.c",
118       "src/third_party/libdisasm/x86_imm.h",
119       "src/third_party/libdisasm/x86_insn.c",
120       "src/third_party/libdisasm/x86_misc.c",
121       "src/third_party/libdisasm/x86_operand_list.c",
122       "src/third_party/libdisasm/x86_operand_list.h",
123     ]
125     defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
127     configs -= [ "//build/config/compiler:chromium_code" ]
128     configs += [ "//build/config/compiler:no_chromium_code" ]
129     configs += [ ":tools_config" ]
130   }
132   executable("microdump_stackwalk") {
133     sources = [
134       "src/processor/microdump.cc",
135       "src/processor/microdump_processor.cc",
136       "src/processor/microdump_stackwalk.cc",
137     ]
139     deps = [
140       ":stackwalk_common",
141       "//build/config/sanitizers:deps",
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       "//build/config/sanitizers:deps",
162     ]
164     defines = [ "BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR" ]
166     configs -= [ "//build/config/compiler:chromium_code" ]
167     configs += [ "//build/config/compiler:no_chromium_code" ]
168     configs += [ ":tools_config" ]
170     # Always want these files included regardless of platform.
171     set_sources_assignment_filter([])
172     sources += [
173       "src/processor/exploitability_linux.cc",
174       "src/processor/exploitability_linux.h",
175       "src/processor/exploitability_win.cc",
176       "src/processor/exploitability_win.h",
177       "src/processor/symbolic_constants_win.cc",
178       "src/processor/symbolic_constants_win.h",
179     ]
180   }
182   executable("minidump_dump") {
183     sources = [
184       "src/processor/basic_code_module.h",
185       "src/processor/basic_code_modules.cc",
186       "src/processor/basic_code_modules.h",
187       "src/processor/dump_context.cc",
188       "src/processor/dump_object.cc",
189       "src/processor/logging.cc",
190       "src/processor/logging.h",
191       "src/processor/minidump.cc",
192       "src/processor/minidump_dump.cc",
193       "src/processor/pathname_stripper.cc",
194       "src/processor/pathname_stripper.h",
195       "src/processor/proc_maps_linux.cc",
196     ]
198     configs += [ ":tools_config" ]
200     # There are some warnings in this code.
201     configs -= [ "//build/config/compiler:chromium_code" ]
202     configs += [ "//build/config/compiler:no_chromium_code" ]
204     deps = [
205       "//build/config/sanitizers:deps",
206     ]
207   }
210 # Mac --------------------------------------------------------------------------
212 if (current_toolchain == host_toolchain && is_mac) {
213   # TODO(GYP) This should be only 64-bit on Mac. From .gypi:
214   # Like ld, dump_syms needs to operate on enough data that it may
215   # actually need to be able to address more than 4GB. Use x86_64.
216   # Don't worry! An x86_64 dump_syms is perfectly able to dump
217   # 32-bit files.
218   executable("dump_syms") {
219     sources = [
220       "src/common/dwarf/bytereader.cc",
221       "src/common/dwarf/dwarf2diehandler.cc",
222       "src/common/dwarf/dwarf2reader.cc",
223       "src/common/dwarf_cfi_to_module.cc",
224       "src/common/dwarf_cu_to_module.cc",
225       "src/common/dwarf_line_to_module.cc",
226       "src/common/language.cc",
227       "src/common/mac/arch_utilities.cc",
228       "src/common/mac/arch_utilities.h",
229       "src/common/mac/dump_syms.mm",
230       "src/common/mac/file_id.cc",
231       "src/common/mac/macho_id.cc",
232       "src/common/mac/macho_reader.cc",
233       "src/common/mac/macho_utilities.cc",
234       "src/common/mac/macho_walker.cc",
235       "src/common/md5.cc",
236       "src/common/module.cc",
237       "src/common/stabs_reader.cc",
238       "src/common/stabs_to_module.cc",
239       "src/tools/mac/dump_syms/dump_syms_tool.mm",
240     ]
242     # For src/common/stabs_reader.h.
243     defines = [ "HAVE_MACH_O_NLIST_H" ]
244     include_dirs = [ "src/common/mac" ]
246     # The DWARF utilities require -funsigned-char.
247     cflags = [ "-funsigned-char" ]
249     configs += [ ":internal_config" ]
251     configs -= [ "//build/config/compiler:chromium_code" ]
252     configs += [ "//build/config/compiler:no_chromium_code" ]
254     # dwarf2reader.cc uses dynamic_cast.
255     configs -= [ "//build/config/compiler:no_rtti" ]
256     configs += [ "//build/config/compiler:rtti" ]
258     libs = [ "Foundation.framework" ]
260     if (!is_debug) {
261       # dump_syms crashes when built at -O1, -O2, and -O3.  It does
262       # not crash at -Os.  To play it safe, dump_syms is always built
263       # at -O0 until this can be sorted out.
264       # http://code.google.com/p/google-breakpad/issues/detail?id=329
265       configs -= [ "//build/config/compiler:optimize" ]
266       cflags += [ "-O0" ]
267     }
269     deps = [
270       "//build/config/sanitizers:deps",
271     ]
272   }
274   executable("symupload") {
275     sources = [
276       "src/common/mac/HTTPMultipartUpload.m",
277       "src/tools/mac/symupload/symupload.m",
278     ]
280     include_dirs = [ "src/common/mac" ]
282     libs = [ "Foundation.framework" ]
284     configs -= [ "//build/config/compiler:chromium_code" ]
285     configs += [ "//build/config/compiler:no_chromium_code" ]
287     deps = [
288       "//build/config/sanitizers:deps",
289     ]
290   }
293 if (is_mac) {
294   static_library("utilities") {
295     sources = [
296       "src/client/mac/crash_generation/ConfigFile.mm",
297       "src/client/mac/handler/breakpad_nlist_64.cc",
298       "src/client/mac/handler/dynamic_images.cc",
299       "src/client/mac/handler/minidump_generator.cc",
300       "src/client/minidump_file_writer.cc",
301       "src/common/convert_UTF.c",
302       "src/common/mac/MachIPC.mm",
303       "src/common/mac/arch_utilities.cc",
304       "src/common/mac/bootstrap_compat.cc",
305       "src/common/mac/file_id.cc",
306       "src/common/mac/launch_reporter.cc",
307       "src/common/mac/macho_id.cc",
308       "src/common/mac/macho_utilities.cc",
309       "src/common/mac/macho_walker.cc",
310       "src/common/mac/string_utilities.cc",
311       "src/common/md5.cc",
312       "src/common/simple_string_dictionary.cc",
313       "src/common/string_conversion.cc",
314     ]
316     configs += [ ":internal_config" ]
318     # There are some warnings in this code.
319     configs -= [ "//build/config/compiler:chromium_code" ]
320     configs += [ "//build/config/compiler:no_chromium_code" ]
321   }
323   executable("crash_inspector") {
324     sources = [
325       "src/client/mac/crash_generation/Inspector.mm",
326       "src/client/mac/crash_generation/InspectorMain.mm",
327     ]
329     # TODO(GYP): 'mac_real_dsym': 1,
331     include_dirs = [
332       "src/client/apple/Framework",
333       "src/common/mac",
334       "src",
335     ]
336     libs = [
337       "CoreServices.framework",
338       "Foundation.framework",
339     ]
341     deps = [
342       ":utilities",
343       "//build/config/sanitizers:deps",
344     ]
345   }
347   # TODO(GYP) this target has some mac_bundle_resources stuff.
348   # executable("crash_report_sender") {
349   # }
350   group("crash_report_sender") {
351   }
353   config("breakpad_config") {
354     include_dirs = [ "src/client/apple/Framework" ]
355   }
357   static_library("breakpad") {
358     sources = [
359       "src/client/mac/Framework/Breakpad.mm",
360       "src/client/mac/Framework/OnDemandServer.mm",
361       "src/client/mac/crash_generation/crash_generation_client.cc",
362       "src/client/mac/crash_generation/crash_generation_client.h",
363       "src/client/mac/handler/exception_handler.cc",
364       "src/client/mac/handler/protected_memory_allocator.cc",
365     ]
367     configs += [ ":internal_config" ]
368     public_configs = [ ":breakpad_config" ]
370     defines = [ "USE_PROTECTED_ALLOCATIONS=1" ]
371     include_dirs = [ "src/client/apple/Framework" ]
373     deps = [
374       ":utilities",
375       ":crash_inspector",
376       ":crash_report_sender",
377     ]
378   }
380   group("client") {
381     public_configs = [ ":client_config" ]
382   }
385 if (is_linux) {
386   executable("symupload") {
387     sources = [
388       "src/common/linux/http_upload.cc",
389       "src/common/linux/http_upload.h",
390       "src/tools/linux/symupload/sym_upload.cc",
391     ]
393     include_dirs = [
394       "src",
395       "src/third_party",
396     ]
398     configs += [ ":tools_config" ]
400     libs = [ "dl" ]
402     deps = [
403       "//build/config/sanitizers:deps",
404     ]
405   }
408 if (is_linux || is_android) {
409   if (current_toolchain == host_toolchain) {
410     # dump_syms is a host tool, so only compile it for the host system.
411     executable("dump_syms") {
412       sources = [
413         "src/common/dwarf/bytereader.cc",
414         "src/common/dwarf/dwarf2diehandler.cc",
415         "src/common/dwarf/dwarf2reader.cc",
416         "src/common/dwarf_cfi_to_module.cc",
417         "src/common/dwarf_cfi_to_module.h",
418         "src/common/dwarf_cu_to_module.cc",
419         "src/common/dwarf_cu_to_module.h",
420         "src/common/dwarf_line_to_module.cc",
421         "src/common/dwarf_line_to_module.h",
422         "src/common/language.cc",
423         "src/common/language.h",
424         "src/common/linux/crc32.cc",
425         "src/common/linux/crc32.h",
426         "src/common/linux/dump_symbols.cc",
427         "src/common/linux/dump_symbols.h",
428         "src/common/linux/elf_symbols_to_module.cc",
429         "src/common/linux/elf_symbols_to_module.h",
430         "src/common/linux/elfutils.cc",
431         "src/common/linux/elfutils.h",
432         "src/common/linux/file_id.cc",
433         "src/common/linux/file_id.h",
434         "src/common/linux/guid_creator.h",
435         "src/common/linux/linux_libc_support.cc",
436         "src/common/linux/linux_libc_support.h",
437         "src/common/linux/memory_mapped_file.cc",
438         "src/common/linux/memory_mapped_file.h",
439         "src/common/module.cc",
440         "src/common/module.h",
441         "src/common/stabs_reader.cc",
442         "src/common/stabs_reader.h",
443         "src/common/stabs_to_module.cc",
444         "src/common/stabs_to_module.h",
445         "src/tools/linux/dump_syms/dump_syms.cc",
446       ]
448       # There are some warnings in this code.
449       configs -= [ "//build/config/compiler:chromium_code" ]
450       configs += [ "//build/config/compiler:no_chromium_code" ]
452       # dwarf2reader.cc uses dynamic_cast. Because we don't typically
453       # don't support RTTI, we enable it for this single target. Since
454       # dump_syms doesn't share any object files with anything else,
455       # this doesn't end up polluting Chrome itself.
456       configs -= [ "//build/config/compiler:no_rtti" ]
457       configs += [ "//build/config/compiler:rtti" ]
459       # Breakpad rev 583 introduced this flag.
460       # Using this define, stabs_reader.h will include a.out.h to
461       # build on Linux.
462       defines = [ "HAVE_A_OUT_H" ]
464       include_dirs = [ "src" ]
466       deps = [
467         "//build/config/sanitizers:deps",
468       ]
469     }
470   }
472   static_library("client") {
473     # Want all these sources for both Linux and Android.
474     set_sources_assignment_filter([])
475     sources = [
476       "src/client/linux/crash_generation/crash_generation_client.cc",
477       "src/client/linux/crash_generation/crash_generation_client.h",
478       "src/client/linux/dump_writer_common/mapping_info.h",
479       "src/client/linux/dump_writer_common/thread_info.cc",
480       "src/client/linux/dump_writer_common/thread_info.h",
481       "src/client/linux/dump_writer_common/ucontext_reader.cc",
482       "src/client/linux/dump_writer_common/ucontext_reader.h",
483       "src/client/linux/handler/exception_handler.cc",
484       "src/client/linux/handler/exception_handler.h",
485       "src/client/linux/handler/minidump_descriptor.cc",
486       "src/client/linux/handler/minidump_descriptor.h",
487       "src/client/linux/log/log.cc",
488       "src/client/linux/log/log.h",
489       "src/client/linux/microdump_writer/microdump_writer.cc",
490       "src/client/linux/microdump_writer/microdump_writer.h",
491       "src/client/linux/minidump_writer/cpu_set.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/linux/minidump_writer/proc_cpuinfo_reader.h",
503       "src/client/minidump_file_writer-inl.h",
504       "src/client/minidump_file_writer.cc",
505       "src/client/minidump_file_writer.h",
506       "src/common/convert_UTF.c",
507       "src/common/convert_UTF.h",
508       "src/common/linux/elf_core_dump.cc",
509       "src/common/linux/elf_core_dump.h",
510       "src/common/linux/elfutils.cc",
511       "src/common/linux/elfutils.h",
512       "src/common/linux/file_id.cc",
513       "src/common/linux/file_id.h",
514       "src/common/linux/google_crashdump_uploader.cc",
515       "src/common/linux/google_crashdump_uploader.h",
516       "src/common/linux/guid_creator.cc",
517       "src/common/linux/guid_creator.h",
518       "src/common/linux/libcurl_wrapper.cc",
519       "src/common/linux/libcurl_wrapper.h",
520       "src/common/linux/linux_libc_support.cc",
521       "src/common/linux/linux_libc_support.h",
522       "src/common/linux/memory_mapped_file.cc",
523       "src/common/linux/memory_mapped_file.h",
524       "src/common/linux/safe_readlink.cc",
525       "src/common/linux/safe_readlink.h",
526       "src/common/memory.h",
527       "src/common/simple_string_dictionary.cc",
528       "src/common/simple_string_dictionary.h",
529       "src/common/string_conversion.cc",
530       "src/common/string_conversion.h",
531     ]
533     configs -= [ "//build/config/compiler:chromium_code" ]
534     configs += [ "//build/config/compiler:no_chromium_code" ]
535     public_configs = [ ":client_config" ]
537     if (current_cpu == "arm" && is_chromeos) {
538       # Avoid running out of registers in
539       # linux_syscall_support.h:sys_clone()'s inline assembly.
540       cflags = [ "-marm" ]
541     }
543     if (is_android) {
544       sources += [ "src/common/android/breakpad_getcontext.S" ]
545     }
547     libs = [ "dl" ]
549     include_dirs = [
550       ".",
551       "src",
552       "src/client",
553       "src/third_party/linux/include",
554     ]
555   }
557   static_library("processor_support") {
558     sources = [
559       "src/common/scoped_ptr.h",
560       "src/processor/basic_code_modules.cc",
561       "src/processor/basic_code_modules.h",
562       "src/processor/dump_context.cc",
563       "src/processor/dump_object.cc",
564       "src/processor/logging.cc",
565       "src/processor/logging.h",
566       "src/processor/minidump.cc",
567       "src/processor/pathname_stripper.cc",
568       "src/processor/pathname_stripper.h",
569       "src/processor/proc_maps_linux.cc",
570     ]
572     include_dirs = [
573       "src",
574       "src/client",
575       "src/third_party/linux/include",
576       ".",
577     ]
579     # There are some warnings in this code.
580     configs -= [ "//build/config/compiler:chromium_code" ]
581     configs += [ "//build/config/compiler:no_chromium_code" ]
582   }
585 if (is_linux) {
586   test("breakpad_unittests") {
587     sources = [
588       "linux/breakpad_googletest_includes.h",
589       "src/client/linux/handler/exception_handler_unittest.cc",
590       "src/client/linux/minidump_writer/cpu_set_unittest.cc",
591       "src/client/linux/minidump_writer/directory_reader_unittest.cc",
592       "src/client/linux/minidump_writer/line_reader_unittest.cc",
593       "src/client/linux/minidump_writer/linux_core_dumper_unittest.cc",
594       "src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc",
595       "src/client/linux/minidump_writer/minidump_writer_unittest.cc",
596       "src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc",
597       "src/client/linux/minidump_writer/proc_cpuinfo_reader_unittest.cc",
598       "src/common/linux/elf_core_dump_unittest.cc",
599       "src/common/linux/file_id_unittest.cc",
600       "src/common/linux/linux_libc_support_unittest.cc",
601       "src/common/linux/synth_elf.cc",
602       "src/common/linux/tests/auto_testfile.h",
603       "src/common/linux/tests/crash_generator.cc",
604       "src/common/linux/tests/crash_generator.h",
605       "src/common/memory_range.h",
606       "src/common/memory_unittest.cc",
607       "src/common/simple_string_dictionary_unittest.cc",
608       "src/common/test_assembler.cc",
609       "src/common/tests/file_utils.cc",
610       "src/common/tests/file_utils.h",
611       "src/tools/linux/md2core/minidump_memory_range.h",
612       "src/tools/linux/md2core/minidump_memory_range_unittest.cc",
613     ]
615     deps = [
616       ":client",
617       ":processor_support",
618       ":linux_dumper_unittest_helper",
619       "//testing/gtest",
620       "//testing/gtest:gtest_main",
621       "//testing/gmock",
622     ]
624     include_dirs = [
625       "linux",  # Use our copy of breakpad_googletest_includes.h
626       "src",
627       ".",
628     ]
630     # There are some warnings in this code.
631     configs -= [ "//build/config/compiler:chromium_code" ]
632     configs += [ "//build/config/compiler:no_chromium_code" ]
634     if (is_clang) {
635       # See http://crbug.com/138571#c18
636       cflags = [ "-Wno-unused-value" ]
637     }
639     if (is_android) {
640       sources += [ "src/common/android/breakpad_getcontext_unittest.cc" ]
641       libs = [ "log" ]
642       include_dirs += [ "src/common/android/include" ]
643       isolate_file = "breakpad_unittests.isolate"
644     }
645   }
647   executable("linux_dumper_unittest_helper") {
648     testonly = true
649     sources = [
650       "src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc",
651     ]
652     deps = [
653       ":processor_support",
654       "//build/config/sanitizers:deps",
655     ]
657     include_dirs = [ "src" ]
659     if (current_cpu == "mipsel" && is_android) {
660       include_dirs += [ "src/common/android/include" ]
661     }
662   }
664   executable("generate_test_dump") {
665     testonly = true
666     sources = [
667       "linux/generate-test-dump.cc",
668     ]
670     # This file has an unused variable warning.
671     configs -= [ "//build/config/compiler:chromium_code" ]
672     configs += [ "//build/config/compiler:no_chromium_code" ]
674     deps = [
675       ":client",
676       "//build/config/sanitizers:deps",
677     ]
679     include_dirs = [ "src" ]
681     if (is_android) {
682       libs = [ "log" ]
683       include_dirs += [ "src/common/android/include" ]
684     }
685   }
687   executable("minidump-2-core") {
688     sources = [
689       "src/tools/linux/md2core/minidump-2-core.cc",
690     ]
692     include_dirs = [ "src" ]
694     deps = [
695       ":client",
696       "//build/config/sanitizers:deps",
697     ]
698   }
700   executable("core-2-minidump") {
701     sources = [
702       "src/tools/linux/core2md/core2md.cc",
703     ]
705     deps = [
706       ":client",
707       "//build/config/sanitizers:deps",
708     ]
710     include_dirs = [ "src" ]
711   }
714 if (is_ios) {
715   static_library("client") {
716     sources = [
717       "src/client/ios/Breakpad.h",
718       "src/client/ios/Breakpad.mm",
719       "src/client/ios/BreakpadController.h",
720       "src/client/ios/BreakpadController.mm",
721       "src/client/ios/handler/ios_exception_minidump_generator.h",
722       "src/client/ios/handler/ios_exception_minidump_generator.mm",
723       "src/client/mac/crash_generation/ConfigFile.h",
724       "src/client/mac/crash_generation/ConfigFile.mm",
725       "src/client/mac/handler/breakpad_nlist_64.cc",
726       "src/client/mac/handler/breakpad_nlist_64.h",
727       "src/client/mac/handler/dynamic_images.cc",
728       "src/client/mac/handler/dynamic_images.h",
729       "src/client/mac/handler/exception_handler.cc",
730       "src/client/mac/handler/exception_handler.h",
731       "src/client/mac/handler/minidump_generator.cc",
732       "src/client/mac/handler/minidump_generator.h",
733       "src/client/mac/handler/protected_memory_allocator.cc",
734       "src/client/mac/handler/protected_memory_allocator.h",
735       "src/client/mac/sender/uploader.h",
736       "src/client/mac/sender/uploader.mm",
737       "src/client/minidump_file_writer-inl.h",
738       "src/client/minidump_file_writer.cc",
739       "src/client/minidump_file_writer.h",
740       "src/common/convert_UTF.c",
741       "src/common/convert_UTF.h",
742       "src/common/mac/HTTPMultipartUpload.m",
743       "src/common/mac/file_id.cc",
744       "src/common/mac/file_id.h",
745       "src/common/mac/macho_id.cc",
746       "src/common/mac/macho_id.h",
747       "src/common/mac/macho_utilities.cc",
748       "src/common/mac/macho_utilities.h",
749       "src/common/mac/macho_walker.cc",
750       "src/common/mac/macho_walker.h",
751       "src/common/mac/string_utilities.cc",
752       "src/common/mac/string_utilities.h",
753       "src/common/md5.cc",
754       "src/common/md5.h",
755       "src/common/simple_string_dictionary.cc",
756       "src/common/simple_string_dictionary.h",
757       "src/common/string_conversion.cc",
758       "src/common/string_conversion.h",
759       "src/google_breakpad/common/minidump_format.h",
760     ]
762     include_dirs = [
763       "src",
764       "src/client/mac/Framework",
765       "src/common/mac",
766     ]
767   }
768   # TODO(GYP) There is some XCode-only targets like ninja-breakpad.
771 if (is_win) {
772   group("client") {
773     public_configs = [ ":client_config" ]
774   }
776   config("breakpad_handler_warnings") {
777     if (is_clang) {
778       # See https://code.google.com/p/google-breakpad/issues/detail?id=658.
779       cflags = [ "-Wno-reorder" ]
780     }
781   }
783   source_set("breakpad_handler") {
784     configs += [ ":handler_config" ]
785     if (is_win) {
786       public_configs = [ ":handler_config" ]
787     }
789     defines = [ "BREAKPAD_NO_TERMINATE_THREAD" ]
791     sources = [
792       "src/client/windows/crash_generation/client_info.cc",
793       "src/client/windows/crash_generation/client_info.h",
794       "src/client/windows/crash_generation/crash_generation_client.cc",
795       "src/client/windows/crash_generation/crash_generation_client.h",
796       "src/client/windows/crash_generation/crash_generation_server.cc",
797       "src/client/windows/crash_generation/crash_generation_server.h",
798       "src/client/windows/crash_generation/minidump_generator.cc",
799       "src/client/windows/crash_generation/minidump_generator.h",
800       "src/client/windows/handler/exception_handler.cc",
801       "src/client/windows/handler/exception_handler.h",
802       "src/common/windows/guid_string.cc",
803       "src/common/windows/guid_string.h",
804       "src/common/windows/string_utils-inl.h",
805       "src/google_breakpad/common/minidump_format.h",
806     ]
807     configs += [ ":breakpad_handler_warnings" ]
808   }
810   source_set("breakpad_sender") {
811     sources = [
812       "src/client/windows/sender/crash_report_sender.cc",
813       "src/client/windows/sender/crash_report_sender.h",
814       "src/common/windows/http_upload.cc",
815       "src/common/windows/http_upload.h",
816     ]
817     configs += [ ":sender_config" ]
818     public_configs = [ ":sender_config" ]
819   }