1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
7 'breakpad_sender.gypi',
8 'breakpad_handler.gypi',
19 # This is needed for GTMLogger to work correctly.
27 'target_name': 'breakpad_utilities',
28 'type': 'static_library',
30 'src/common/convert_UTF.c',
31 'src/client/mac/handler/breakpad_nlist_64.cc',
32 'src/client/mac/handler/dynamic_images.cc',
33 'src/common/mac/file_id.cc',
34 'src/common/mac/MachIPC.mm',
35 'src/common/mac/macho_id.cc',
36 'src/common/mac/macho_utilities.cc',
37 'src/common/mac/macho_walker.cc',
38 'src/client/minidump_file_writer.cc',
39 'src/client/mac/handler/minidump_generator.cc',
40 'src/common/mac/SimpleStringDictionary.mm',
41 'src/common/string_conversion.cc',
42 'src/common/mac/string_utilities.cc',
47 'target_name': 'crash_inspector',
56 'src/client/apple/Framework',
60 'src/client/mac/crash_generation/ConfigFile.mm',
61 'src/client/mac/crash_generation/Inspector.mm',
62 'src/client/mac/crash_generation/InspectorMain.mm',
66 '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
67 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
72 'target_name': 'crash_report_sender',
82 'src/common/mac/HTTPMultipartUpload.m',
83 'src/client/mac/sender/crash_report_sender.m',
84 'src/client/mac/sender/uploader.mm',
85 'src/common/mac/GTMLogger.m',
87 'mac_bundle_resources': [
88 'src/client/mac/sender/English.lproj/Localizable.strings',
89 'src/client/mac/sender/crash_report_sender.icns',
90 'src/client/mac/sender/Breakpad.xib',
91 'src/client/mac/sender/crash_report_sender-Info.plist',
93 'mac_bundle_resources!': [
94 'src/client/mac/sender/crash_report_sender-Info.plist',
97 'INFOPLIST_FILE': 'src/client/mac/sender/crash_report_sender-Info.plist',
101 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
102 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
103 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
108 'target_name': 'dump_syms',
109 'type': 'executable',
111 # ++ ensures this comes before src brought in from target_defaults.
118 'src/common/dwarf/dwarf2diehandler.cc',
119 'src/common/dwarf/dwarf2reader.cc',
120 'src/common/dwarf/bytereader.cc',
121 'src/common/dwarf_cfi_to_module.cc',
122 'pending/src/common/dwarf_cu_to_module.cc',
123 'src/common/dwarf_line_to_module.cc',
124 'src/common/language.cc',
125 'pending/src/common/module.cc',
126 'src/common/mac/dump_syms.mm',
127 'src/common/mac/file_id.cc',
128 'src/common/mac/macho_id.cc',
129 'src/common/mac/macho_reader.cc',
130 'src/common/mac/macho_utilities.cc',
131 'src/common/mac/macho_walker.cc',
132 'src/common/stabs_reader.cc',
133 'src/common/stabs_to_module.cc',
134 'src/tools/mac/dump_syms/dump_syms_tool.mm',
138 # For src/common/stabs_reader.h.
139 'HAVE_MACH_O_NLIST_H',
142 # Like ld, dump_syms needs to operate on enough data that it may
143 # actually need to be able to address more than 4GB. Use x86_64.
144 # Don't worry! An x86_64 dump_syms is perfectly able to dump
150 # The DWARF utilities require -funsigned-char.
151 'GCC_CHAR_IS_UNSIGNED_CHAR': 'YES',
153 # dwarf2reader.cc uses dynamic_cast.
154 'GCC_ENABLE_CPP_RTTI': 'YES',
158 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
164 # dump_syms crashes when built at -O1, -O2, and -O3. It does
165 # not crash at -Os. To play it safe, dump_syms is always built
166 # at -O0 until this can be sorted out.
167 # http://code.google.com/p/google-breakpad/issues/detail?id=329
168 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
174 'target_name': 'symupload',
175 'type': 'executable',
180 'src/common/mac/HTTPMultipartUpload.m',
181 'src/tools/mac/symupload/symupload.m',
185 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
190 'target_name': 'breakpad',
191 'type': 'static_library',
193 'breakpad_utilities',
195 'crash_report_sender',
198 'src/client/apple/Framework',
200 'direct_dependent_settings': {
202 'src/client/apple/Framework',
206 'USE_PROTECTED_ALLOCATIONS=1',
209 'src/client/mac/crash_generation/crash_generation_client.cc',
210 'src/client/mac/crash_generation/crash_generation_client.h',
211 'src/client/mac/handler/protected_memory_allocator.cc',
212 'src/client/mac/handler/exception_handler.cc',
213 'src/client/mac/Framework/Breakpad.mm',
214 'src/client/mac/Framework/OnDemandServer.mm',
221 # Tools needed for archiving build symbols.
222 ['linux_breakpad==1', {
225 'target_name': 'symupload',
226 'type': 'executable',
228 # This uses the system libcurl, so don't use the default 32-bit
229 # compile flags when building on a 64-bit machine.
231 'host_arch': '<!(uname -m)',
234 ['host_arch=="x86_64"', {
235 'cflags!': ['-m32', '-march=pentium4', '-msse2',
237 'ldflags!': ['-m32'],
239 'include_dirs!': ['/usr/include32'],
244 'src/tools/linux/symupload/sym_upload.cc',
245 'src/common/linux/http_upload.cc',
246 'src/common/linux/http_upload.h',
258 'target_name': 'dump_syms',
259 'type': 'executable',
261 # dwarf2reader.cc uses dynamic_cast. Because we don't typically
262 # don't support RTTI, we enable it for this single target. Since
263 # dump_syms doesn't share any object files with anything else,
264 # this doesn't end up polluting Chrome itself.
265 'cflags_cc!': ['-fno-rtti'],
268 'src/common/dwarf/bytereader.cc',
269 'src/common/dwarf_cfi_to_module.cc',
270 'src/common/dwarf_cfi_to_module.h',
271 'src/common/dwarf_cu_to_module.cc',
272 'src/common/dwarf_cu_to_module.h',
273 'src/common/dwarf/dwarf2diehandler.cc',
274 'src/common/dwarf/dwarf2reader.cc',
275 'src/common/dwarf_line_to_module.cc',
276 'src/common/dwarf_line_to_module.h',
277 'src/common/language.cc',
278 'src/common/language.h',
279 'src/common/linux/dump_symbols.cc',
280 'src/common/linux/dump_symbols.h',
281 'src/common/linux/elf_symbols_to_module.cc',
282 'src/common/linux/elf_symbols_to_module.h',
283 'src/common/linux/file_id.cc',
284 'src/common/linux/file_id.h',
285 'src/common/linux/memory_mapped_file.cc',
286 'src/common/linux/memory_mapped_file.h',
287 'src/common/linux/guid_creator.h',
288 'src/common/module.cc',
289 'src/common/module.h',
290 'src/common/stabs_reader.cc',
291 'src/common/stabs_reader.h',
292 'src/common/stabs_to_module.cc',
293 'src/common/stabs_to_module.h',
294 'src/tools/linux/dump_syms/dump_syms.cc',
297 # Breakpad rev 583 introduced this flag.
298 # Using this define, stabs_reader.h will include a.out.h to
314 'target_name': 'breakpad_client',
315 'type': 'static_library',
318 'src/client/linux/crash_generation/crash_generation_client.cc',
319 'src/client/linux/crash_generation/crash_generation_client.h',
320 'src/client/linux/handler/exception_handler.cc',
321 'src/client/linux/minidump_writer/directory_reader.h',
322 'src/client/linux/minidump_writer/line_reader.h',
323 'src/client/linux/minidump_writer/linux_dumper.cc',
324 'src/client/linux/minidump_writer/linux_dumper.h',
325 'src/client/linux/minidump_writer/minidump_writer.cc',
326 'src/client/linux/minidump_writer/minidump_writer.h',
327 'src/client/minidump_file_writer-inl.h',
328 'src/client/minidump_file_writer.cc',
329 'src/client/minidump_file_writer.h',
330 'src/common/convert_UTF.c',
331 'src/common/convert_UTF.h',
332 'src/common/linux/file_id.cc',
333 'src/common/linux/file_id.h',
334 'src/common/linux/google_crashdump_uploader.cc',
335 'src/common/linux/google_crashdump_uploader.h',
336 'src/common/linux/guid_creator.cc',
337 'src/common/linux/guid_creator.h',
338 'src/common/linux/libcurl_wrapper.cc',
339 'src/common/linux/libcurl_wrapper.h',
340 'src/common/linux/linux_libc_support.h',
341 'src/common/linux/memory_mapped_file.cc',
342 'src/common/linux/memory_mapped_file.h',
343 'src/common/linux/safe_readlink.cc',
344 'src/common/linux/safe_readlink.h',
345 'src/common/memory.h',
346 'src/common/string_conversion.cc',
347 'src/common/string_conversion.h',
351 ['target_arch=="arm"', {
352 'cflags': ['-Wa,-mimplicit-it=always'],
365 'src/third_party/linux/include',
371 # Breakpad r693 uses some files from src/processor in unit tests.
372 'target_name': 'breakpad_processor_support',
373 'type': 'static_library',
376 'src/processor/basic_code_modules.cc',
377 'src/processor/basic_code_modules.h',
378 'src/processor/logging.cc',
379 'src/processor/logging.h',
380 'src/processor/minidump.cc',
381 'src/processor/pathname_stripper.cc',
382 'src/processor/pathname_stripper.h',
388 'src/third_party/linux/include',
394 'target_name': 'breakpad_unittests',
395 'type': 'executable',
397 '../testing/gtest.gyp:gtest',
398 '../testing/gtest.gyp:gtest_main',
399 '../testing/gmock.gyp:gmock',
401 'breakpad_processor_support',
405 'linux/breakpad_googletest_includes.h',
406 'src/client/linux/handler/exception_handler_unittest.cc',
407 'src/client/linux/minidump_writer/directory_reader_unittest.cc',
408 'src/client/linux/minidump_writer/line_reader_unittest.cc',
409 'src/client/linux/minidump_writer/linux_dumper_unittest.cc',
410 'src/client/linux/minidump_writer/minidump_writer_unittest.cc',
411 'src/common/linux/file_id_unittest.cc',
412 'src/common/linux/linux_libc_support_unittest.cc',
413 'src/common/linux/synth_elf.cc',
414 'src/common/memory_unittest.cc',
415 'src/common/test_assembler.cc',
419 'linux', # Use our copy of breakpad_googletest_includes.h
426 'target_name': 'generate_test_dump',
427 'type': 'executable',
430 'linux/generate-test-dump.cc',
443 'target_name': 'minidump-2-core',
444 'type': 'executable',
447 'src/tools/linux/md2core/minidump-2-core.cc'