OLD | NEW |
| (Empty) |
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. | |
4 | |
5 { | |
6 'includes': [ | |
7 'breakpad_sender.gypi', | |
8 'breakpad_handler.gypi', | |
9 ], | |
10 'conditions': [ | |
11 ['OS!="win"', { | |
12 'targets': [ | |
13 { | |
14 # code shared by both {micro,mini}dump_stackwalk | |
15 # GN version: //breakpad:stackwalk_common | |
16 'target_name': 'stackwalk_common', | |
17 'type': 'static_library', | |
18 'includes': ['breakpad_tools.gypi'], | |
19 'defines': ['BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR'], | |
20 'sources': [ | |
21 'src/processor/basic_code_module.h', | |
22 'src/processor/basic_code_modules.cc', | |
23 'src/processor/basic_code_modules.h', | |
24 'src/processor/basic_source_line_resolver.cc', | |
25 'src/processor/call_stack.cc', | |
26 'src/processor/cfi_frame_info.cc', | |
27 'src/processor/cfi_frame_info.h', | |
28 'src/processor/disassembler_x86.cc', | |
29 'src/processor/disassembler_x86.h', | |
30 'src/processor/dump_context.cc', | |
31 'src/processor/dump_object.cc', | |
32 'src/processor/logging.cc', | |
33 'src/processor/logging.h', | |
34 'src/processor/pathname_stripper.cc', | |
35 'src/processor/pathname_stripper.h', | |
36 'src/processor/process_state.cc', | |
37 'src/processor/proc_maps_linux.cc', | |
38 'src/processor/simple_symbol_supplier.cc', | |
39 'src/processor/simple_symbol_supplier.h', | |
40 'src/processor/source_line_resolver_base.cc', | |
41 'src/processor/stack_frame_cpu.cc', | |
42 'src/processor/stack_frame_symbolizer.cc', | |
43 'src/processor/stackwalk_common.cc', | |
44 'src/processor/stackwalker.cc', | |
45 'src/processor/stackwalker_amd64.cc', | |
46 'src/processor/stackwalker_amd64.h', | |
47 'src/processor/stackwalker_arm.cc', | |
48 'src/processor/stackwalker_arm.h', | |
49 'src/processor/stackwalker_arm64.cc', | |
50 'src/processor/stackwalker_arm64.h', | |
51 'src/processor/stackwalker_mips.cc', | |
52 'src/processor/stackwalker_mips.h', | |
53 'src/processor/stackwalker_ppc.cc', | |
54 'src/processor/stackwalker_ppc.h', | |
55 'src/processor/stackwalker_ppc64.cc', | |
56 'src/processor/stackwalker_ppc64.h', | |
57 'src/processor/stackwalker_sparc.cc', | |
58 'src/processor/stackwalker_sparc.h', | |
59 'src/processor/stackwalker_x86.cc', | |
60 'src/processor/stackwalker_x86.h', | |
61 'src/processor/tokenize.cc', | |
62 'src/processor/tokenize.h', | |
63 # libdisasm | |
64 'src/third_party/libdisasm/ia32_implicit.c', | |
65 'src/third_party/libdisasm/ia32_implicit.h', | |
66 'src/third_party/libdisasm/ia32_insn.c', | |
67 'src/third_party/libdisasm/ia32_insn.h', | |
68 'src/third_party/libdisasm/ia32_invariant.c', | |
69 'src/third_party/libdisasm/ia32_invariant.h', | |
70 'src/third_party/libdisasm/ia32_modrm.c', | |
71 'src/third_party/libdisasm/ia32_modrm.h', | |
72 'src/third_party/libdisasm/ia32_opcode_tables.c', | |
73 'src/third_party/libdisasm/ia32_opcode_tables.h', | |
74 'src/third_party/libdisasm/ia32_operand.c', | |
75 'src/third_party/libdisasm/ia32_operand.h', | |
76 'src/third_party/libdisasm/ia32_reg.c', | |
77 'src/third_party/libdisasm/ia32_reg.h', | |
78 'src/third_party/libdisasm/ia32_settings.c', | |
79 'src/third_party/libdisasm/ia32_settings.h', | |
80 'src/third_party/libdisasm/libdis.h', | |
81 'src/third_party/libdisasm/qword.h', | |
82 'src/third_party/libdisasm/x86_disasm.c', | |
83 'src/third_party/libdisasm/x86_format.c', | |
84 'src/third_party/libdisasm/x86_imm.c', | |
85 'src/third_party/libdisasm/x86_imm.h', | |
86 'src/third_party/libdisasm/x86_insn.c', | |
87 'src/third_party/libdisasm/x86_misc.c', | |
88 'src/third_party/libdisasm/x86_operand_list.c', | |
89 'src/third_party/libdisasm/x86_operand_list.h', | |
90 ], | |
91 'conditions': [ | |
92 ['OS=="ios"', { | |
93 'toolsets': ['host'], | |
94 }], | |
95 ], | |
96 }, | |
97 { | |
98 # GN version: //breakpad:microdump_stackwalk | |
99 'target_name': 'microdump_stackwalk', | |
100 'type': 'executable', | |
101 'dependencies': ['stackwalk_common'], | |
102 'includes': ['breakpad_tools.gypi'], | |
103 'defines': ['BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR'], | |
104 'sources': [ | |
105 'src/processor/microdump.cc', | |
106 'src/processor/microdump_processor.cc', | |
107 'src/processor/microdump_stackwalk.cc', | |
108 ], | |
109 'conditions': [ | |
110 ['OS=="ios"', { | |
111 'toolsets': ['host'], | |
112 }], | |
113 ], | |
114 }, | |
115 { | |
116 # GN version: //breakpad:minidump_stackwalk | |
117 'target_name': 'minidump_stackwalk', | |
118 'type': 'executable', | |
119 'dependencies': ['stackwalk_common'], | |
120 'includes': ['breakpad_tools.gypi'], | |
121 'defines': ['BPLOG_MINIMUM_SEVERITY=SEVERITY_ERROR'], | |
122 'sources': [ | |
123 'src/processor/exploitability.cc', | |
124 'src/processor/exploitability_linux.cc', | |
125 'src/processor/exploitability_linux.h', | |
126 'src/processor/exploitability_win.cc', | |
127 'src/processor/exploitability_win.h', | |
128 'src/processor/minidump.cc', | |
129 'src/processor/minidump_processor.cc', | |
130 'src/processor/minidump_stackwalk.cc', | |
131 'src/processor/symbolic_constants_win.cc', | |
132 'src/processor/symbolic_constants_win.h', | |
133 ], | |
134 'conditions': [ | |
135 ['OS=="ios"', { | |
136 'toolsets': ['host'], | |
137 }], | |
138 ], | |
139 }, | |
140 { | |
141 # GN version: //breakpad:minidump_dump | |
142 'target_name': 'minidump_dump', | |
143 'type': 'executable', | |
144 'includes': ['breakpad_tools.gypi'], | |
145 'sources': [ | |
146 'src/processor/basic_code_module.h', | |
147 'src/processor/basic_code_modules.cc', | |
148 'src/processor/basic_code_modules.h', | |
149 'src/processor/dump_context.cc', | |
150 'src/processor/dump_object.cc', | |
151 'src/processor/logging.cc', | |
152 'src/processor/logging.h', | |
153 'src/processor/minidump.cc', | |
154 'src/processor/minidump_dump.cc', | |
155 'src/processor/pathname_stripper.cc', | |
156 'src/processor/pathname_stripper.h', | |
157 'src/processor/proc_maps_linux.cc', | |
158 ], | |
159 'conditions': [ | |
160 ['OS=="ios"', { | |
161 'toolsets': ['host'], | |
162 }], | |
163 ], | |
164 }, | |
165 ], | |
166 }], | |
167 ['OS=="mac" or OS=="ios"', { | |
168 'target_defaults': { | |
169 'include_dirs': [ | |
170 'src', | |
171 ], | |
172 'configurations': { | |
173 'Debug_Base': { | |
174 'defines': [ | |
175 # This is needed for GTMLogger to work correctly. | |
176 'DEBUG', | |
177 ], | |
178 }, | |
179 }, | |
180 }, | |
181 'targets': [ | |
182 { | |
183 # GN version: //breakpad:dump_syms | |
184 'target_name': 'dump_syms', | |
185 'type': 'executable', | |
186 'toolsets': ['host'], | |
187 'include_dirs': [ | |
188 'src/common/mac', | |
189 ], | |
190 'sources': [ | |
191 'src/common/dwarf/bytereader.cc', | |
192 'src/common/dwarf_cfi_to_module.cc', | |
193 'src/common/dwarf_cu_to_module.cc', | |
194 'src/common/dwarf/dwarf2diehandler.cc', | |
195 'src/common/dwarf/dwarf2reader.cc', | |
196 'src/common/dwarf/elf_reader.cc', | |
197 'src/common/dwarf/elf_reader.h', | |
198 'src/common/dwarf_line_to_module.cc', | |
199 'src/common/language.cc', | |
200 'src/common/mac/arch_utilities.cc', | |
201 'src/common/mac/arch_utilities.h', | |
202 'src/common/mac/dump_syms.cc', | |
203 'src/common/mac/file_id.cc', | |
204 'src/common/mac/macho_id.cc', | |
205 'src/common/mac/macho_reader.cc', | |
206 'src/common/mac/macho_utilities.cc', | |
207 'src/common/mac/macho_walker.cc', | |
208 'src/common/md5.cc', | |
209 'src/common/module.cc', | |
210 'src/common/stabs_reader.cc', | |
211 'src/common/stabs_to_module.cc', | |
212 'src/tools/mac/dump_syms/dump_syms_tool.cc', | |
213 ], | |
214 'defines': [ | |
215 # For src/common/stabs_reader.h. | |
216 'HAVE_MACH_O_NLIST_H', | |
217 ], | |
218 'xcode_settings': { | |
219 # Like ld, dump_syms needs to operate on enough data that it may | |
220 # actually need to be able to address more than 4GB. Use x86_64. | |
221 # Don't worry! An x86_64 dump_syms is perfectly able to dump | |
222 # 32-bit files. | |
223 'ARCHS': [ | |
224 'x86_64', | |
225 ], | |
226 | |
227 # The DWARF utilities require -funsigned-char. | |
228 'GCC_CHAR_IS_UNSIGNED_CHAR': 'YES', | |
229 | |
230 # dwarf2reader.cc uses dynamic_cast. | |
231 'GCC_ENABLE_CPP_RTTI': 'YES', | |
232 }, | |
233 'link_settings': { | |
234 'libraries': [ | |
235 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', | |
236 ], | |
237 }, | |
238 'configurations': { | |
239 'Release_Base': { | |
240 'xcode_settings': { | |
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 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 | |
246 }, | |
247 }, | |
248 }, | |
249 }, | |
250 { | |
251 # GN version: //breakpad:symupload | |
252 'target_name': 'symupload', | |
253 'type': 'executable', | |
254 'toolsets': ['host'], | |
255 'include_dirs': [ | |
256 'src/common/mac', | |
257 ], | |
258 'sources': [ | |
259 'src/common/mac/HTTPMultipartUpload.m', | |
260 'src/tools/mac/symupload/symupload.m', | |
261 ], | |
262 'link_settings': { | |
263 'libraries': [ | |
264 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', | |
265 ], | |
266 } | |
267 }, | |
268 ], | |
269 }], | |
270 ['OS=="mac"', { | |
271 'target_defaults': { | |
272 'include_dirs': [ | |
273 'src', | |
274 ], | |
275 'configurations': { | |
276 'Debug_Base': { | |
277 'defines': [ | |
278 # This is needed for GTMLogger to work correctly. | |
279 'DEBUG', | |
280 ], | |
281 }, | |
282 }, | |
283 }, | |
284 'targets': [ | |
285 { | |
286 # GN version: //breakpad:utilities | |
287 'target_name': 'breakpad_utilities', | |
288 'type': 'static_library', | |
289 'sources': [ | |
290 'src/client/mac/crash_generation/ConfigFile.mm', | |
291 'src/client/mac/handler/breakpad_nlist_64.cc', | |
292 'src/client/mac/handler/dynamic_images.cc', | |
293 'src/client/mac/handler/minidump_generator.cc', | |
294 'src/client/minidump_file_writer.cc', | |
295 'src/common/convert_UTF.c', | |
296 'src/common/mac/MachIPC.mm', | |
297 'src/common/mac/arch_utilities.cc', | |
298 'src/common/mac/bootstrap_compat.cc', | |
299 'src/common/mac/file_id.cc', | |
300 'src/common/mac/launch_reporter.cc', | |
301 'src/common/mac/macho_id.cc', | |
302 'src/common/mac/macho_utilities.cc', | |
303 'src/common/mac/macho_walker.cc', | |
304 'src/common/mac/string_utilities.cc', | |
305 'src/common/md5.cc', | |
306 'src/common/simple_string_dictionary.cc', | |
307 'src/common/string_conversion.cc', | |
308 ], | |
309 'conditions': [ | |
310 ['OS=="ios"', { | |
311 'xcode_settings' : { | |
312 'WARNING_CFLAGS': [ | |
313 # See https://bugs.chromium.org/p/google-breakpad/issues/detai
l?id=675. | |
314 # TODO(crbug.com/569158): remove when fixed. | |
315 '-Wno-deprecated-declarations', | |
316 ], | |
317 }, | |
318 }], | |
319 ], | |
320 }, | |
321 { | |
322 # GN version: //breakpad:crash_inspector | |
323 'target_name': 'crash_inspector', | |
324 'type': 'executable', | |
325 'variables': { | |
326 'mac_real_dsym': 1, | |
327 }, | |
328 'dependencies': [ | |
329 'breakpad_utilities', | |
330 ], | |
331 'include_dirs': [ | |
332 'src/client/apple/Framework', | |
333 'src/common/mac', | |
334 ], | |
335 'sources': [ | |
336 'src/client/mac/crash_generation/Inspector.mm', | |
337 'src/client/mac/crash_generation/InspectorMain.mm', | |
338 ], | |
339 'link_settings': { | |
340 'libraries': [ | |
341 '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework', | |
342 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', | |
343 ], | |
344 } | |
345 }, | |
346 { | |
347 # GN version: //breakpad:crash_report_sender | |
348 'target_name': 'crash_report_sender', | |
349 'type': 'executable', | |
350 'mac_bundle': 1, | |
351 'variables': { | |
352 'mac_real_dsym': 1, | |
353 }, | |
354 'include_dirs': [ | |
355 'src/common/mac', | |
356 ], | |
357 'sources': [ | |
358 'src/common/mac/HTTPMultipartUpload.m', | |
359 'src/client/mac/sender/crash_report_sender.m', | |
360 'src/client/mac/sender/uploader.mm', | |
361 'src/common/mac/GTMLogger.m', | |
362 ], | |
363 'mac_bundle_resources': [ | |
364 'src/client/mac/sender/English.lproj/Localizable.strings', | |
365 'src/client/mac/sender/crash_report_sender.icns', | |
366 'src/client/mac/sender/Breakpad.xib', | |
367 'src/client/mac/sender/crash_report_sender-Info.plist', | |
368 ], | |
369 'mac_bundle_resources!': [ | |
370 'src/client/mac/sender/crash_report_sender-Info.plist', | |
371 ], | |
372 'xcode_settings': { | |
373 'INFOPLIST_FILE': 'src/client/mac/sender/crash_report_sender-Info.p
list', | |
374 }, | |
375 'link_settings': { | |
376 'libraries': [ | |
377 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', | |
378 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', | |
379 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framewor
k', | |
380 ], | |
381 } | |
382 }, | |
383 { | |
384 # GN version: //breakpad | |
385 'target_name': 'breakpad', | |
386 'type': 'static_library', | |
387 'dependencies': [ | |
388 'breakpad_utilities', | |
389 'crash_inspector', | |
390 'crash_report_sender', | |
391 ], | |
392 'include_dirs': [ | |
393 'src/client/apple/Framework', | |
394 ], | |
395 'direct_dependent_settings': { | |
396 'include_dirs': [ | |
397 'src/client/apple/Framework', | |
398 ], | |
399 }, | |
400 'defines': [ | |
401 'USE_PROTECTED_ALLOCATIONS=1', | |
402 ], | |
403 'sources': [ | |
404 'src/client/mac/crash_generation/crash_generation_client.cc', | |
405 'src/client/mac/crash_generation/crash_generation_client.h', | |
406 'src/client/mac/handler/protected_memory_allocator.cc', | |
407 'src/client/mac/handler/exception_handler.cc', | |
408 'src/client/mac/Framework/Breakpad.mm', | |
409 'src/client/mac/Framework/OnDemandServer.mm', | |
410 ], | |
411 }, | |
412 ], | |
413 }], | |
414 [ 'OS=="linux" or OS=="android" or os_bsd==1', { | |
415 'conditions': [ | |
416 ['OS=="android"', { | |
417 'defines': [ | |
418 '__ANDROID__', | |
419 ], | |
420 }], | |
421 ], | |
422 # Tools needed for archiving build symbols. | |
423 'targets': [ | |
424 { | |
425 # GN version: //breakpad:symupload | |
426 'target_name': 'symupload', | |
427 'type': 'executable', | |
428 | |
429 'includes': ['breakpad_tools.gypi'], | |
430 | |
431 'sources': [ | |
432 'src/tools/linux/symupload/sym_upload.cc', | |
433 'src/common/linux/http_upload.cc', | |
434 'src/common/linux/http_upload.h', | |
435 'src/common/linux/symbol_upload.cc', | |
436 'src/common/linux/symbol_upload.h', | |
437 ], | |
438 'include_dirs': [ | |
439 'src', | |
440 'src/third_party', | |
441 ], | |
442 'link_settings': { | |
443 'libraries': [ | |
444 '-ldl', | |
445 ], | |
446 }, | |
447 }, | |
448 { | |
449 # GN version: //breakpad:dump_syms | |
450 'target_name': 'dump_syms', | |
451 'type': 'executable', | |
452 'toolsets': ['host'], | |
453 | |
454 # dwarf2reader.cc uses dynamic_cast. Because we don't typically | |
455 # don't support RTTI, we enable it for this single target. Since | |
456 # dump_syms doesn't share any object files with anything else, | |
457 # this doesn't end up polluting Chrome itself. | |
458 'cflags_cc!': ['-fno-rtti'], | |
459 | |
460 'sources': [ | |
461 'src/common/dwarf/bytereader.cc', | |
462 'src/common/dwarf_cfi_to_module.cc', | |
463 'src/common/dwarf_cfi_to_module.h', | |
464 'src/common/dwarf_cu_to_module.cc', | |
465 'src/common/dwarf_cu_to_module.h', | |
466 'src/common/dwarf/dwarf2diehandler.cc', | |
467 'src/common/dwarf/dwarf2reader.cc', | |
468 'src/common/dwarf/elf_reader.cc', | |
469 'src/common/dwarf/elf_reader.h', | |
470 'src/common/dwarf_line_to_module.cc', | |
471 'src/common/dwarf_line_to_module.h', | |
472 'src/common/language.cc', | |
473 'src/common/language.h', | |
474 'src/common/linux/crc32.cc', | |
475 'src/common/linux/crc32.h', | |
476 'src/common/linux/dump_symbols.cc', | |
477 'src/common/linux/dump_symbols.h', | |
478 'src/common/linux/elf_symbols_to_module.cc', | |
479 'src/common/linux/elf_symbols_to_module.h', | |
480 'src/common/linux/elfutils.cc', | |
481 'src/common/linux/elfutils.h', | |
482 'src/common/linux/file_id.cc', | |
483 'src/common/linux/file_id.h', | |
484 'src/common/linux/linux_libc_support.cc', | |
485 'src/common/linux/linux_libc_support.h', | |
486 'src/common/linux/memory_mapped_file.cc', | |
487 'src/common/linux/memory_mapped_file.h', | |
488 'src/common/linux/guid_creator.h', | |
489 'src/common/module.cc', | |
490 'src/common/module.h', | |
491 'src/common/stabs_reader.cc', | |
492 'src/common/stabs_reader.h', | |
493 'src/common/stabs_to_module.cc', | |
494 'src/common/stabs_to_module.h', | |
495 'src/tools/linux/dump_syms/dump_syms.cc', | |
496 ], | |
497 | |
498 # Breakpad rev 583 introduced this flag. | |
499 # Using this define, stabs_reader.h will include a.out.h to | |
500 # build on Linux. | |
501 'defines': [ | |
502 'HAVE_A_OUT_H', | |
503 ], | |
504 | |
505 'include_dirs': [ | |
506 'src', | |
507 '..', | |
508 ], | |
509 }, | |
510 { | |
511 # GN version: //breakpad:client | |
512 'target_name': 'breakpad_client', | |
513 'type': 'static_library', | |
514 | |
515 'sources': [ | |
516 'src/client/linux/crash_generation/crash_generation_client.cc', | |
517 'src/client/linux/crash_generation/crash_generation_client.h', | |
518 'src/client/linux/handler/exception_handler.cc', | |
519 'src/client/linux/handler/exception_handler.h', | |
520 'src/client/linux/handler/minidump_descriptor.cc', | |
521 'src/client/linux/handler/minidump_descriptor.h', | |
522 'src/client/linux/log/log.cc', | |
523 'src/client/linux/log/log.h', | |
524 'src/client/linux/dump_writer_common/mapping_info.h', | |
525 'src/client/linux/dump_writer_common/thread_info.cc', | |
526 'src/client/linux/dump_writer_common/thread_info.h', | |
527 'src/client/linux/dump_writer_common/ucontext_reader.cc', | |
528 'src/client/linux/dump_writer_common/ucontext_reader.h', | |
529 'src/client/linux/microdump_writer/microdump_writer.cc', | |
530 'src/client/linux/microdump_writer/microdump_writer.h', | |
531 'src/client/linux/minidump_writer/cpu_set.h', | |
532 'src/client/linux/minidump_writer/directory_reader.h', | |
533 'src/client/linux/minidump_writer/line_reader.h', | |
534 'src/client/linux/minidump_writer/linux_core_dumper.cc', | |
535 'src/client/linux/minidump_writer/linux_core_dumper.h', | |
536 'src/client/linux/minidump_writer/linux_dumper.cc', | |
537 'src/client/linux/minidump_writer/linux_dumper.h', | |
538 'src/client/linux/minidump_writer/linux_ptrace_dumper.cc', | |
539 'src/client/linux/minidump_writer/linux_ptrace_dumper.h', | |
540 'src/client/linux/minidump_writer/minidump_writer.cc', | |
541 'src/client/linux/minidump_writer/minidump_writer.h', | |
542 'src/client/linux/minidump_writer/proc_cpuinfo_reader.h', | |
543 'src/client/minidump_file_writer-inl.h', | |
544 'src/client/minidump_file_writer.cc', | |
545 'src/client/minidump_file_writer.h', | |
546 'src/common/convert_UTF.c', | |
547 'src/common/convert_UTF.h', | |
548 'src/common/linux/elf_core_dump.cc', | |
549 'src/common/linux/elf_core_dump.h', | |
550 'src/common/linux/elfutils.cc', | |
551 'src/common/linux/elfutils.h', | |
552 'src/common/linux/file_id.cc', | |
553 'src/common/linux/file_id.h', | |
554 'src/common/linux/google_crashdump_uploader.cc', | |
555 'src/common/linux/google_crashdump_uploader.h', | |
556 'src/common/linux/guid_creator.cc', | |
557 'src/common/linux/guid_creator.h', | |
558 'src/common/linux/libcurl_wrapper.cc', | |
559 'src/common/linux/libcurl_wrapper.h', | |
560 'src/common/linux/linux_libc_support.cc', | |
561 'src/common/linux/linux_libc_support.h', | |
562 'src/common/linux/memory_mapped_file.cc', | |
563 'src/common/linux/memory_mapped_file.h', | |
564 'src/common/linux/safe_readlink.cc', | |
565 'src/common/linux/safe_readlink.h', | |
566 'src/common/memory.h', | |
567 'src/common/simple_string_dictionary.cc', | |
568 'src/common/simple_string_dictionary.h', | |
569 'src/common/string_conversion.cc', | |
570 'src/common/string_conversion.h', | |
571 ], | |
572 | |
573 'conditions': [ | |
574 ['target_arch=="arm" and chromeos==1', { | |
575 # Avoid running out of registers in | |
576 # linux_syscall_support.h:sys_clone()'s inline assembly. | |
577 'cflags': ['-marm'], | |
578 }], | |
579 ['chromeos==1', { | |
580 'defines': ['__CHROMEOS__'], | |
581 }], | |
582 ['OS=="android"', { | |
583 'include_dirs': [ | |
584 'src/common/android/include', | |
585 ], | |
586 'direct_dependent_settings': { | |
587 'include_dirs': [ | |
588 'src/common/android/include', | |
589 ], | |
590 }, | |
591 'sources': [ | |
592 'src/common/android/breakpad_getcontext.S', | |
593 ], | |
594 }], | |
595 ['OS!="android"', { | |
596 'link_settings': { | |
597 'libraries': [ | |
598 # In case of Android, '-ldl' is added in common.gypi, since it | |
599 # is needed for stlport_static. For LD, the order of libraries | |
600 # is important, and thus we skip to add it here. | |
601 '-ldl', | |
602 ], | |
603 }, | |
604 }], | |
605 ['clang==1 and target_arch=="ia32"', { | |
606 'cflags!': [ | |
607 # Clang's -mstackrealign doesn't work well with | |
608 # linux_syscall_support.h hand written asm syscalls. | |
609 # See https://crbug.com/556393 | |
610 '-mstackrealign', | |
611 ], | |
612 }], | |
613 ], | |
614 | |
615 'include_dirs': [ | |
616 'src', | |
617 'src/client', | |
618 'src/third_party/linux/include', | |
619 '..', | |
620 '.', | |
621 ], | |
622 }, | |
623 { | |
624 # Breakpad r693 uses some files from src/processor in unit tests. | |
625 # GN version: //breakpad:processor_support | |
626 'target_name': 'breakpad_processor_support', | |
627 'type': 'static_library', | |
628 | |
629 'sources': [ | |
630 'src/common/scoped_ptr.h', | |
631 'src/processor/basic_code_modules.cc', | |
632 'src/processor/basic_code_modules.h', | |
633 'src/processor/dump_context.cc', | |
634 'src/processor/dump_object.cc', | |
635 'src/processor/logging.cc', | |
636 'src/processor/logging.h', | |
637 'src/processor/minidump.cc', | |
638 'src/processor/pathname_stripper.cc', | |
639 'src/processor/pathname_stripper.h', | |
640 'src/processor/proc_maps_linux.cc', | |
641 ], | |
642 | |
643 'include_dirs': [ | |
644 'src', | |
645 'src/client', | |
646 'src/third_party/linux/include', | |
647 '..', | |
648 '.', | |
649 ], | |
650 }, | |
651 { | |
652 # GN version: //breakpad:breakpad_unittests | |
653 'target_name': 'breakpad_unittests', | |
654 'type': 'executable', | |
655 'dependencies': [ | |
656 '../testing/gtest.gyp:gtest', | |
657 '../testing/gtest.gyp:gtest_main', | |
658 '../testing/gmock.gyp:gmock', | |
659 'breakpad_client', | |
660 'breakpad_processor_support', | |
661 'linux_dumper_unittest_helper', | |
662 ], | |
663 'variables': { | |
664 'clang_warning_flags': [ | |
665 # See http://crbug.com/138571#c18 | |
666 '-Wno-unused-value', | |
667 ], | |
668 }, | |
669 | |
670 'sources': [ | |
671 'linux/breakpad_googletest_includes.h', | |
672 'src/client/linux/handler/exception_handler_unittest.cc', | |
673 'src/client/linux/minidump_writer/cpu_set_unittest.cc', | |
674 'src/client/linux/minidump_writer/directory_reader_unittest.cc', | |
675 'src/client/linux/minidump_writer/line_reader_unittest.cc', | |
676 'src/client/linux/minidump_writer/linux_core_dumper_unittest.cc', | |
677 'src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc', | |
678 'src/client/linux/minidump_writer/minidump_writer_unittest.cc', | |
679 'src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc'
, | |
680 'src/client/linux/minidump_writer/proc_cpuinfo_reader_unittest.cc', | |
681 'src/common/linux/elf_core_dump_unittest.cc', | |
682 'src/common/linux/file_id_unittest.cc', | |
683 'src/common/linux/linux_libc_support_unittest.cc', | |
684 'src/common/linux/synth_elf.cc', | |
685 'src/common/linux/tests/auto_testfile.h', | |
686 'src/common/linux/tests/crash_generator.cc', | |
687 'src/common/linux/tests/crash_generator.h', | |
688 'src/common/memory_range.h', | |
689 'src/common/memory_unittest.cc', | |
690 'src/common/simple_string_dictionary_unittest.cc', | |
691 'src/common/test_assembler.cc', | |
692 'src/common/tests/file_utils.cc', | |
693 'src/common/tests/file_utils.h', | |
694 'src/tools/linux/md2core/minidump_memory_range.h', | |
695 'src/tools/linux/md2core/minidump_memory_range_unittest.cc', | |
696 ], | |
697 | |
698 # The build-id is required to test the minidump writer. | |
699 'ldflags': [ | |
700 "-Wl,--build-id=0x000102030405060708090a0b0c0d0e0f101112131415161718
191a1b1c1d1e1f", | |
701 ], | |
702 | |
703 'include_dirs': [ | |
704 'linux', # Use our copy of breakpad_googletest_includes.h | |
705 'src', | |
706 '..', | |
707 '.', | |
708 ], | |
709 'conditions': [ | |
710 ['OS=="android"', { | |
711 'libraries': [ | |
712 '-llog', | |
713 ], | |
714 'include_dirs': [ | |
715 'src/common/android/include', | |
716 ], | |
717 'sources': [ | |
718 'src/common/android/breakpad_getcontext_unittest.cc', | |
719 ], | |
720 'variables': { | |
721 'test_type': 'gtest', | |
722 'test_suite_name': '<(_target_name)', | |
723 }, | |
724 'includes': [ '../build/android/test_runner.gypi' ], | |
725 'ldflags!': [ | |
726 # We are overriding the build-id above so remove the default. | |
727 '-Wl,--build-id=sha1', | |
728 ], | |
729 }], | |
730 ['clang==1 and target_arch=="ia32"', { | |
731 'cflags!': [ | |
732 # Clang's -mstackrealign doesn't work well with | |
733 # linux_syscall_support.h hand written asm syscalls. | |
734 # See https://crbug.com/556393 | |
735 '-mstackrealign', | |
736 ], | |
737 }], | |
738 ], | |
739 }, | |
740 { | |
741 # GN version: //breakpad:linux_dumper_unittest_helper | |
742 'target_name': 'linux_dumper_unittest_helper', | |
743 'type': 'executable', | |
744 'dependencies': [ | |
745 'breakpad_processor_support', | |
746 ], | |
747 'sources': [ | |
748 'src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc', | |
749 ], | |
750 | |
751 'include_dirs': [ | |
752 'src', | |
753 '..', | |
754 ], | |
755 'conditions': [ | |
756 ['target_arch=="mipsel" and OS=="android"', { | |
757 'include_dirs': [ | |
758 'src/common/android/include', | |
759 ], | |
760 }], | |
761 ], | |
762 }, | |
763 { | |
764 # GN version: //breakpad:generate_test_dump | |
765 'target_name': 'generate_test_dump', | |
766 'type': 'executable', | |
767 | |
768 'sources': [ | |
769 'linux/generate-test-dump.cc', | |
770 ], | |
771 | |
772 'dependencies': [ | |
773 'breakpad_client', | |
774 ], | |
775 | |
776 'include_dirs': [ | |
777 '..', | |
778 'src', | |
779 ], | |
780 'conditions': [ | |
781 ['OS=="android"', { | |
782 'libraries': [ | |
783 '-llog', | |
784 ], | |
785 'include_dirs': [ | |
786 'src/common/android/include', | |
787 ], | |
788 }], | |
789 ], | |
790 }, | |
791 { | |
792 # GN version: //breakpad:minidump-2-core | |
793 'target_name': 'minidump-2-core', | |
794 'type': 'executable', | |
795 | |
796 'sources': [ | |
797 'src/tools/linux/md2core/minidump-2-core.cc' | |
798 ], | |
799 | |
800 'dependencies': [ | |
801 'breakpad_client', | |
802 ], | |
803 | |
804 'include_dirs': [ | |
805 '..', | |
806 'src', | |
807 ], | |
808 }, | |
809 { | |
810 # GN version: //breakpad:core-2-minidump | |
811 'target_name': 'core-2-minidump', | |
812 'type': 'executable', | |
813 | |
814 'sources': [ | |
815 'src/tools/linux/core2md/core2md.cc' | |
816 ], | |
817 | |
818 'dependencies': [ | |
819 'breakpad_client', | |
820 ], | |
821 | |
822 'include_dirs': [ | |
823 '..', | |
824 'src', | |
825 ], | |
826 }, | |
827 ], | |
828 }], | |
829 ['OS=="ios"', { | |
830 'targets': [ | |
831 { | |
832 # GN version: //breakpad:client | |
833 'target_name': 'breakpad_client', | |
834 'type': 'static_library', | |
835 'sources': [ | |
836 'src/client/ios/Breakpad.h', | |
837 'src/client/ios/Breakpad.mm', | |
838 'src/client/ios/BreakpadController.h', | |
839 'src/client/ios/BreakpadController.mm', | |
840 'src/client/ios/handler/ios_exception_minidump_generator.mm', | |
841 'src/client/ios/handler/ios_exception_minidump_generator.h', | |
842 'src/client/mac/crash_generation/ConfigFile.h', | |
843 'src/client/mac/crash_generation/ConfigFile.mm', | |
844 'src/client/mac/handler/breakpad_nlist_64.cc', | |
845 'src/client/mac/handler/breakpad_nlist_64.h', | |
846 'src/client/mac/handler/dynamic_images.cc', | |
847 'src/client/mac/handler/dynamic_images.h', | |
848 'src/client/mac/handler/protected_memory_allocator.cc', | |
849 'src/client/mac/handler/protected_memory_allocator.h', | |
850 'src/client/mac/handler/exception_handler.cc', | |
851 'src/client/mac/handler/exception_handler.h', | |
852 'src/client/mac/handler/minidump_generator.cc', | |
853 'src/client/mac/handler/minidump_generator.h', | |
854 'src/client/mac/sender/uploader.h', | |
855 'src/client/mac/sender/uploader.mm', | |
856 'src/client/minidump_file_writer.cc', | |
857 'src/client/minidump_file_writer.h', | |
858 'src/client/minidump_file_writer-inl.h', | |
859 'src/common/convert_UTF.c', | |
860 'src/common/convert_UTF.h', | |
861 'src/common/mac/file_id.cc', | |
862 'src/common/mac/file_id.h', | |
863 'src/common/mac/HTTPMultipartUpload.m', | |
864 'src/common/mac/macho_id.cc', | |
865 'src/common/mac/macho_id.h', | |
866 'src/common/mac/macho_utilities.cc', | |
867 'src/common/mac/macho_utilities.h', | |
868 'src/common/mac/macho_walker.cc', | |
869 'src/common/mac/macho_walker.h', | |
870 'src/common/mac/string_utilities.cc', | |
871 'src/common/mac/string_utilities.h', | |
872 'src/common/md5.cc', | |
873 'src/common/md5.h', | |
874 'src/common/simple_string_dictionary.cc', | |
875 'src/common/simple_string_dictionary.h', | |
876 'src/common/string_conversion.cc', | |
877 'src/common/string_conversion.h', | |
878 'src/google_breakpad/common/minidump_format.h', | |
879 ], | |
880 'include_dirs': [ | |
881 'src', | |
882 'src/client/mac/Framework', | |
883 'src/common/mac', | |
884 ], | |
885 'direct_dependent_settings': { | |
886 'include_dirs': [ | |
887 'src', | |
888 ], | |
889 }, | |
890 'xcode_settings' : { | |
891 'WARNING_CFLAGS': [ | |
892 # See https://bugs.chromium.org/p/google-breakpad/issues/detail?id
=675. | |
893 # TODO(crbug.com/569158): remove when fixed. | |
894 '-Wno-deprecated-declarations', | |
895 ], | |
896 }, | |
897 } | |
898 ] | |
899 }], | |
900 ['OS=="android"', { | |
901 'targets': [ | |
902 { | |
903 'target_name': 'breakpad_unittests_stripped', | |
904 'type': 'none', | |
905 'dependencies': [ 'breakpad_unittests' ], | |
906 'actions': [{ | |
907 'action_name': 'strip breakpad_unittests', | |
908 'inputs': [ '<(PRODUCT_DIR)/breakpad_unittests' ], | |
909 'outputs': [ '<(PRODUCT_DIR)/breakpad_unittests_stripped' ], | |
910 'action': [ '<(android_strip)', '<@(_inputs)', '-o', '<@(_outputs)'
], | |
911 }], | |
912 }, | |
913 { | |
914 'target_name': 'breakpad_unittests_deps', | |
915 'type': 'none', | |
916 'dependencies': [ | |
917 'breakpad_unittests', | |
918 'linux_dumper_unittest_helper', | |
919 ], | |
920 'variables': { | |
921 'output_dir': '<(PRODUCT_DIR)/breakpad_unittests__dist/', | |
922 'native_binary': '<(PRODUCT_DIR)/breakpad_unittests', | |
923 'include_main_binary': 1, | |
924 'extra_files': ['<(PRODUCT_DIR)/linux_dumper_unittest_helper'], | |
925 }, | |
926 'includes': [ | |
927 '../build/android/native_app_dependencies.gypi' | |
928 ], | |
929 } | |
930 ], | |
931 'conditions': [ | |
932 ['test_isolation_mode != "noop"', | |
933 { | |
934 'targets': [ | |
935 { | |
936 'target_name': 'breakpad_unittests_apk_run', | |
937 'type': 'none', | |
938 'dependencies': [ | |
939 'breakpad_unittests', | |
940 ], | |
941 'includes': [ | |
942 '../build/isolate.gypi', | |
943 ], | |
944 'sources': [ | |
945 'breakpad_unittests_apk.isolate', | |
946 ], | |
947 }, | |
948 ] | |
949 } | |
950 ], | |
951 ], | |
952 }], | |
953 ], | |
954 } | |
OLD | NEW |