Revert 74344 - BackingStoreSkia: Use skia for painting in RenderWidgetHostViewViews.
[chromium-blink-merge.git] / breakpad / breakpad.gyp
blob41894f1b27a138bbebbac9d1b4b8dd3d180f6b12
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.
6   'includes': [
7     'breakpad_sender.gypi',
8     'breakpad_handler.gypi',
9   ],
10   'conditions': [
11     [ 'OS=="mac"', {
12       'target_defaults': {
13         'include_dirs': [
14           'src',
15         ],
16         'configurations': {
17           'Debug_Base': {
18             'defines': [
19               # This is needed for GTMLogger to work correctly.
20               'DEBUG',
21             ],
22           },
23         },
24       },
25       'targets': [
26         {
27           'target_name': 'breakpad_utilities',
28           'type': '<(library)',
29           'sources': [
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',
43           ],
44           'link_settings': {
45             'libraries': ['$(SDKROOT)/usr/lib/libcrypto.dylib'],
46           }
47         },
48         {
49           'target_name': 'crash_inspector',
50           'type': 'executable',
51           'variables': {
52             'mac_real_dsym': 1,
53           },
54           'dependencies': [
55             'breakpad_utilities',
56           ],
57           'include_dirs': [
58             'src/common/mac',
59           ],
60           'sources': [
61             'src/client/mac/crash_generation/Inspector.mm',
62             'src/client/mac/crash_generation/InspectorMain.mm',
63           ],
64           'link_settings': {
65             'libraries': [
66               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
67             ],
68           }
69         },
70         {
71           'target_name': 'crash_report_sender',
72           'type': 'executable',
73           'mac_bundle': 1,
74           'variables': {
75             'mac_real_dsym': 1,
76           },
77           'include_dirs': [
78             'src/common/mac',
79           ],
80           'sources': [
81             'src/common/mac/HTTPMultipartUpload.m',
82             'src/client/mac/sender/crash_report_sender.m',
83             'src/common/mac/GTMLogger.m',
84           ],
85           'mac_bundle_resources': [
86             'src/client/mac/sender/English.lproj/Localizable.strings',
87             'src/client/mac/sender/crash_report_sender.icns',
88             'src/client/mac/sender/Breakpad.xib',
89             'src/client/mac/sender/crash_report_sender-Info.plist',
90           ],
91           'mac_bundle_resources!': [
92              'src/client/mac/sender/crash_report_sender-Info.plist',
93           ],
94           'xcode_settings': {
95              'INFOPLIST_FILE': 'src/client/mac/sender/crash_report_sender-Info.plist',
96           },
97           'link_settings': {
98             'libraries': [
99               '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
100               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
101               '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
102             ],
103           }
104         },
105         {
106           'target_name': 'dump_syms',
107           'type': 'executable',
108           'include_dirs': [
109             'src/common/mac',
110           ],
111           'sources': [
112             'src/common/dwarf/dwarf2diehandler.cc',
113             'src/common/dwarf/dwarf2reader.cc',
114             'src/common/dwarf/bytereader.cc',
115             'src/common/dwarf_cfi_to_module.cc',
116             'src/common/dwarf_cu_to_module.cc',
117             'src/common/dwarf_line_to_module.cc',
118             'src/common/language.cc',
119             'src/common/module.cc',
120             'src/common/mac/dump_syms.mm',
121             'src/common/mac/file_id.cc',
122             'src/common/mac/macho_id.cc',
123             'src/common/mac/macho_reader.cc',
124             'src/common/mac/macho_utilities.cc',
125             'src/common/mac/macho_walker.cc',
126             'src/common/stabs_reader.cc',
127             'src/common/stabs_to_module.cc',
128             'src/tools/mac/dump_syms/dump_syms_tool.mm',
129           ],
130           'defines': [
131             # For src/common/stabs_reader.h.
132             'HAVE_MACH_O_NLIST_H',
133           ],
134           'xcode_settings': {
135             # The DWARF utilities require -funsigned-char.
136             'GCC_CHAR_IS_UNSIGNED_CHAR': 'YES',
137             # dwarf2reader.cc uses dynamic_cast.
138             'GCC_ENABLE_CPP_RTTI': 'YES',
139           },
140           'link_settings': {
141             'libraries': [
142               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
143               '$(SDKROOT)/usr/lib/libcrypto.dylib',
144             ],
145           },
146           'configurations': {
147             'Release_Base': {
148               'xcode_settings': {
149                 # dump_syms crashes when built at -O1, -O2, and -O3.  It does
150                 # not crash at -Os.  To play it safe, dump_syms is always built
151                 # at -O0 until this can be sorted out.
152                 # http://code.google.com/p/google-breakpad/issues/detail?id=329
153                 'GCC_OPTIMIZATION_LEVEL': '0',  # -O0
154                },
155              },
156           },
157         },
158         {
159           'target_name': 'symupload',
160           'type': 'executable',
161           'include_dirs': [
162             'src/common/mac',
163           ],
164           'sources': [
165             'src/common/mac/HTTPMultipartUpload.m',
166             'src/tools/mac/symupload/symupload.m',
167           ],
168           'link_settings': {
169             'libraries': [
170               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
171             ],
172           }
173         },
174         {
175           'target_name': 'breakpad',
176           'type': '<(library)',
177           'dependencies': [
178             'breakpad_utilities',
179             'crash_inspector',
180             'crash_report_sender',
181           ],
182           'sources': [
183             'src/client/mac/crash_generation/crash_generation_client.cc',
184             'src/client/mac/crash_generation/crash_generation_client.h',
185             'src/client/mac/handler/protected_memory_allocator.cc',
186             'src/client/mac/handler/exception_handler.cc',
187             'src/client/mac/Framework/Breakpad.mm',
188             'src/client/mac/Framework/OnDemandServer.mm',
189           ],
190         },
191       ],
192     }],
193     [ 'OS=="linux"', {
194       'conditions': [
195         # Tools needed for archiving build symbols.
196         ['linux_breakpad==1', {
197           'targets': [
198             {
199               'target_name': 'symupload',
200               'type': 'executable',
202               # This uses the system libcurl, so don't use the default 32-bit
203               # compile flags when building on a 64-bit machine.
204               'variables': {
205                 'host_arch': '<!(uname -m)',
206               },
207               'conditions': [
208                 ['host_arch=="x86_64"', {
209                   'cflags!': ['-m32', '-march=pentium4', '-msse2',
210                               '-mfpmath=sse'],
211                   'ldflags!': ['-m32'],
212                   'cflags': ['-O2'],
213                 }],
214               ],
216               'sources': [
217                 'src/tools/linux/symupload/sym_upload.cc',
218                 'src/common/linux/http_upload.cc',
219                 'src/common/linux/http_upload.h',
220               ],
221               'include_dirs': [
222                 'src',
223               ],
224               'link_settings': {
225                 'libraries': [
226                   '-ldl',
227                 ],
228               },
229             },
230             {
231               'target_name': 'dump_syms',
232               'type': 'executable',
234               # dwarf2reader.cc uses dynamic_cast. Because we don't typically
235               # don't support RTTI, we enable it for this single target. Since
236               # dump_syms doesn't share any object files with anything else,
237               # this doesn't end up polluting Chrome itself.
238               'cflags_cc!': ['-fno-rtti'],
240               'sources': [
241                 'src/common/dwarf/bytereader.cc',
242                 'src/common/dwarf_cfi_to_module.cc',
243                 'src/common/dwarf_cfi_to_module.h',
244                 'src/common/dwarf_cu_to_module.cc',
245                 'src/common/dwarf_cu_to_module.h',
246                 'src/common/dwarf/dwarf2diehandler.cc',
247                 'src/common/dwarf/dwarf2reader.cc',
248                 'src/common/dwarf_line_to_module.cc',
249                 'src/common/dwarf_line_to_module.h',
250                 'src/common/language.cc',
251                 'src/common/language.h',
252                 'src/common/linux/dump_symbols.cc',
253                 'src/common/linux/dump_symbols.h',
254                 'src/common/linux/file_id.cc',
255                 'src/common/linux/file_id.h',
256                 'src/common/linux/guid_creator.h',
257                 'src/common/module.cc',
258                 'src/common/module.h',
259                 'src/common/stabs_reader.cc',
260                 'src/common/stabs_reader.h',
261                 'src/common/stabs_to_module.cc',
262                 'src/common/stabs_to_module.h',
263                 'src/tools/linux/dump_syms/dump_syms.cc',
264               ],
266               # Breakpad rev 583 introduced this flag.
267               # Using this define, stabs_reader.h will include a.out.h to
268               # build on Linux.
269               'defines': [
270                 'HAVE_A_OUT_H',
271               ],
273               'include_dirs': [
274                 'src',
275                 '..',
276               ],
277             },
278           ],
279         }],
280       ],
281       'targets': [
282         {
283           'target_name': 'breakpad_client',
284           'type': '<(library)',
286           'sources': [
287             'src/client/linux/crash_generation/crash_generation_client.cc',
288             'src/client/linux/crash_generation/crash_generation_client.h',
289             'src/client/linux/handler/exception_handler.cc',
290             'src/client/linux/minidump_writer/directory_reader.h',
291             'src/client/linux/minidump_writer/line_reader.h',
292             'src/client/linux/minidump_writer/linux_dumper.cc',
293             'src/client/linux/minidump_writer/linux_dumper.h',
294             'src/client/linux/minidump_writer/minidump_writer.cc',
295             'src/client/linux/minidump_writer/minidump_writer.h',
296             'src/client/minidump_file_writer-inl.h',
297             'src/client/minidump_file_writer.cc',
298             'src/client/minidump_file_writer.h',
299             'src/common/convert_UTF.c',
300             'src/common/convert_UTF.h',
301             'src/common/linux/file_id.cc',
302             'src/common/linux/file_id.h',
303             'src/common/linux/google_crashdump_uploader.cc',
304             'src/common/linux/google_crashdump_uploader.h',
305             'src/common/linux/guid_creator.cc',
306             'src/common/linux/guid_creator.h',
307             'src/common/linux/libcurl_wrapper.cc',
308             'src/common/linux/libcurl_wrapper.h',
309             'src/common/linux/linux_libc_support.h',
310             'src/common/linux/linux_syscall_support.h',
311             'src/common/memory.h',
312             'src/common/string_conversion.cc',
313             'src/common/string_conversion.h',
314           ],
316           'link_settings': {
317             'libraries': [
318               '-ldl',
319             ],
320           },
322           'include_dirs': [
323             'src',
324             'src/client',
325             'src/third_party/linux/include',
326             '..',
327             '.',
328           ],
329         },
330         {
331           # Breakpad r693 uses some files from src/processor in unit tests.
332           'target_name': 'breakpad_processor_support',
333           'type': '<(library)',
335           'sources': [
336             'src/processor/basic_code_modules.cc',
337             'src/processor/basic_code_modules.h',
338             'src/processor/logging.cc',
339             'src/processor/logging.h',
340             'src/processor/minidump.cc',
341             'src/processor/minidump.h',
342             'src/processor/pathname_stripper.cc',
343             'src/processor/pathname_stripper.h',
344           ],
346           'include_dirs': [
347             'src',
348             'src/client',
349             'src/third_party/linux/include',
350             '..',
351             '.',
352           ],
353         },
354         {
355           'target_name': 'breakpad_unittests',
356           'type': 'executable',
357           'dependencies': [
358             '../testing/gtest.gyp:gtest',
359             '../testing/gtest.gyp:gtest_main',
360             '../testing/gmock.gyp:gmock',
361             'breakpad_client',
362             'breakpad_processor_support',
363           ],
365           'sources': [
366             'linux/breakpad_googletest_includes.h',
367             'src/client/linux/handler/exception_handler_unittest.cc',
368             'src/client/linux/minidump_writer/directory_reader_unittest.cc',
369             'src/client/linux/minidump_writer/line_reader_unittest.cc',
370             'src/client/linux/minidump_writer/linux_dumper_unittest.cc',
371             'src/client/linux/minidump_writer/minidump_writer_unittest.cc',
372             'src/common/linux/file_id_unittest.cc',
373             'src/common/linux/linux_libc_support_unittest.cc',
374             'src/common/memory_unittest.cc',
375           ],
377           'include_dirs': [
378             'linux', # Use our copy of breakpad_googletest_includes.h
379             'src',
380             '..',
381             '.',
382           ],
383         },
384         {
385           'target_name': 'generate_test_dump',
386           'type': 'executable',
388           'sources': [
389             'linux/generate-test-dump.cc',
390           ],
392           'dependencies': [
393             'breakpad_client',
394           ],
396           'include_dirs': [
397             '..',
398             'src',
399           ],
400         },
401         {
402           'target_name': 'minidump-2-core',
403           'type': 'executable',
405           'sources': [
406             'src/tools/linux/md2core/minidump-2-core.cc'
407           ],
409           'include_dirs': [
410             '..',
411             'src',
412           ],
413         },
414       ],
415     }],
416   ],
419 # Local Variables:
420 # tab-width:2
421 # indent-tabs-mode:nil
422 # End:
423 # vim: set expandtab tabstop=2 shiftwidth=2: