Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: components/crash.gypi

Issue 1351923002: Revert of Turn components/crash into a layered component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/components_tests.gyp ('k') | components/crash/README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 { 5 {
6 'conditions': [ 6 'targets': [
7 ['OS!="ios"', { 7 {
8 'targets': [ 8 'target_name': 'crash_component_lib',
9 { 9 'type': 'static_library',
10 'target_name': 'crash_component_lib', 10 'sources': [
11 'type': 'static_library', 11 'crash/app/crash_keys_win.cc',
12 'sources': [ 12 'crash/app/crash_keys_win.h',
13 'crash/content/app/crash_keys_win.cc', 13 'crash/app/crash_reporter_client.cc',
14 'crash/content/app/crash_keys_win.h', 14 'crash/app/crash_reporter_client.h',
15 'crash/content/app/crash_reporter_client.cc', 15 ],
16 'crash/content/app/crash_reporter_client.h', 16 'include_dirs': [
17 '..',
18 '../breakpad/src',
19 ],
20 },
21 {
22 # TODO(mark): https://crbug.com/466890: merge this target with
23 # crash_component.
24 #
25 # This is a temporary base target that is depended on by both
26 # crash_component and crash_component_breakpad_mac_to_be_deleted. It
27 # provides everything common to both of those targets. For a short period,
28 # there are two Mac crash component implementations. The new one uses a
29 # Crashpad implementation and is used by Chrome. The old one uses a
30 # Breakpad implementation and is used by content_shell. Consumers should
31 # depend on the desired target. All three targets behave identically on
32 # non-Mac. When content_shell and any other consumers are migrated to the
33 # Crashpad implementation on Mac, crash_component will merge back into
34 # this target, crash_component_non_mac, which will be renamed
35 # crash_component. crash_component_breakpad_mac_to_be_deleted will be
36 # deleted.
37 #
38 # While this situation exists:
39 #
40 # Do not depend on this target directly! Depend on
41 # crash_component_breakpad_mac_to_be_deleted for old Breakpad behavior on
42 # all platforms, or preferably, depend on crash_component to get Breakpad
43 # everywhere except for Mac, where you will get Crashpad.
44 'target_name': 'crash_component_non_mac',
45 'variables': {
46 'conditions': [
47 ['OS == "ios" or OS == "mac"', {
48 # On IOS there are no files compiled into the library, and we
49 # can't have libraries with zero objects.
50 # For now, the same applies to Mac OS X, until this target merges
51 # with crash_component.
52 'crash_component_target_type%': 'none',
53 }, {
54 'crash_component_target_type%': 'static_library',
55 }],
56 ],
57 },
58 'type': '<(crash_component_target_type)',
59 'sources': [
60 'crash/app/breakpad_linux.cc',
61 'crash/app/breakpad_linux.h',
62 'crash/app/breakpad_linux_impl.h',
63 'crash/app/breakpad_win.cc',
64 'crash/app/breakpad_win.h',
65 'crash/app/hard_error_handler_win.cc',
66 'crash/app/hard_error_handler_win.h',
67 ],
68 'dependencies': [
69 'crash_component_lib',
70 '../base/base.gyp:base',
71 ],
72 'defines': ['CRASH_IMPLEMENTATION'],
73 'conditions': [
74 ['OS=="win"', {
75 'dependencies': [
76 '../breakpad/breakpad.gyp:breakpad_handler',
77 '../breakpad/breakpad.gyp:breakpad_sender',
78 '../sandbox/sandbox.gyp:sandbox',
79 ],
80 }],
81 ['os_posix == 1 and OS != "mac" and OS != "ios"', {
82 'dependencies': [
83 '../breakpad/breakpad.gyp:breakpad_client',
84 ],
85 'include_dirs': [
86 '../breakpad/src',
87 ],
88 }],
89 ],
90 'target_conditions': [
91 # Need 'target_conditions' to override default filename_rules to include
92 # the files on Android.
93 ['OS=="android"', {
94 'sources/': [
95 ['include', '^crash/app/breakpad_linux\\.cc$'],
96 ],
97 }],
98 ],
99 },
100 {
101 # Note: if you depend on this target, you need to either link in
102 # content.gyp:content_common, or add
103 # content/public/common/content_switches.cc to your sources.
104 #
105 # GN version: //components/crash/app
106
107 # TODO(mark): https://crbug.com/466890: merge this target with
108 # crash_component_non_mac.
109 #
110 # Most of this target is actually in its dependency,
111 # crash_component_non_mac. See the comment in that target for an
112 # explanation for the split. The split is temporary and the two targets
113 # will be unified again soon.
114 'target_name': 'crash_component',
115 'variables': {
116 'conditions': [
117 ['OS != "mac" ', {
118 # There are no source files on any platform but Mac OS X.
119 'crash_component_target_type%': 'none',
120 }, {
121 'crash_component_target_type%': 'static_library',
122 }],
123 ],
124 },
125 'type': '<(crash_component_target_type)',
126 'sources': [
127 'crash/app/crashpad_mac.h',
128 'crash/app/crashpad_mac.mm',
129 ],
130 'dependencies': [
131 'crash_component_non_mac',
132 'crash_component_lib',
133 '../base/base.gyp:base',
134 ],
135 'defines': ['CRASH_IMPLEMENTATION'],
136 'conditions': [
137 ['OS=="mac"', {
138 'dependencies': [
139 '../third_party/crashpad/crashpad/client/client.gyp:crashpad_client' ,
140 ],
141 }],
142 ],
143 },
144 {
145 # TODO(mark): https://crbug.com/466890: remove this target.
146 #
147 # This is a temporary target provided for Mac Breakpad users that have not
148 # yet migrated to Crashpad (namely content_shell). This target will be
149 # removed shortly and all consumers will be expected to use Crashpad as
150 # the Mac crash-reporting client. See the comment in the
151 # crash_component_non_mac target for more details.
152 'target_name': 'crash_component_breakpad_mac_to_be_deleted',
153 'variables': {
154 'conditions': [
155 ['OS != "mac" ', {
156 # There are no source files on any platform but Mac OS X.
157 'crash_component_target_type%': 'none',
158 }, {
159 'crash_component_target_type%': 'static_library',
160 }],
161 ],
162 },
163 'type': '<(crash_component_target_type)',
164 'sources': [
165 'crash/app/breakpad_mac.h',
166 'crash/app/breakpad_mac.mm',
167 ],
168 'dependencies': [
169 'crash_component_non_mac',
170 'crash_component_lib',
171 ],
172 'defines': ['CRASH_IMPLEMENTATION'],
173 'conditions': [
174 ['OS=="mac"', {
175 'dependencies': [
176 '../breakpad/breakpad.gyp:breakpad',
17 ], 177 ],
18 'include_dirs': [ 178 'include_dirs': [
19 '..', 179 '..',
180 ],
181 }],
182 ],
183 },
184 {
185 # GN version: //components/crash/app:test_support
186 'target_name': 'crash_test_support',
187 'type': 'none',
188 'dependencies': [
189 'crash_component_lib',
190 ],
191 'direct_dependent_settings': {
192 'include_dirs' : [
193 '../breakpad/src',
194 ],
195 }
196 },
197 ],
198 'conditions': [
199 ['OS=="win"', {
200 'targets': [
201 {
202 # GN version: //components/crash/tools:crash_service
203 'target_name': 'breakpad_crash_service',
204 'type': 'static_library',
205 'dependencies': [
206 '../base/base.gyp:base',
207 '../breakpad/breakpad.gyp:breakpad_handler',
208 '../breakpad/breakpad.gyp:breakpad_sender',
209 ],
210 'sources': [
211 'crash/tools/crash_service.cc',
212 'crash/tools/crash_service.h',
213 ],
214 },
215 ],
216 }],
217 ['OS=="win" and target_arch=="ia32"', {
218 'targets': [
219 {
220 # Note: if you depend on this target, you need to either link in
221 # content.gyp:content_common, or add
222 # content/public/common/content_switches.cc to your sources.
223 'target_name': 'breakpad_win64',
224 'type': 'static_library',
225 'sources': [
226 'crash/app/breakpad_linux.cc',
227 'crash/app/breakpad_linux.h',
228 'crash/app/breakpad_linux_impl.h',
229 'crash/app/breakpad_mac.h',
230 'crash/app/breakpad_mac.mm',
231 'crash/app/breakpad_win.cc',
232 'crash/app/breakpad_win.h',
233 # TODO(siggi): test the x64 version too.
234 'crash/app/crash_keys_win.cc',
235 'crash/app/crash_keys_win.h',
236 'crash/app/crash_reporter_client.cc',
237 'crash/app/crash_reporter_client.h',
238 'crash/app/hard_error_handler_win.cc',
239 'crash/app/hard_error_handler_win.h',
240 ],
241 'defines': [
242 'COMPILE_CONTENT_STATICALLY',
243 'CRASH_IMPLEMENTATION',
244 ],
245 'dependencies': [
246 '../base/base.gyp:base_win64',
247 '../breakpad/breakpad.gyp:breakpad_handler_win64',
248 '../breakpad/breakpad.gyp:breakpad_sender_win64',
249 '../sandbox/sandbox.gyp:sandbox_win64',
250 ],
251 'configurations': {
252 'Common_Base': {
253 'msvs_target_platform': 'x64',
254 },
255 },
256 },
257 {
258 'target_name': 'breakpad_crash_service_win64',
259 'type': 'static_library',
260 'dependencies': [
261 '../base/base.gyp:base_win64',
262 '../breakpad/breakpad.gyp:breakpad_handler_win64',
263 '../breakpad/breakpad.gyp:breakpad_sender_win64',
264 ],
265 'sources': [
266 'crash/tools/crash_service.cc',
267 'crash/tools/crash_service.h',
268 ],
269 'configurations': {
270 'Common_Base': {
271 'msvs_target_platform': 'x64',
272 },
273 },
274 },
275 ],
276 }],
277 ['OS=="mac"', {
278 'targets': [
279 {
280 'target_name': 'breakpad_stubs',
281 'type': 'static_library',
282 'dependencies': [
283 '../base/base.gyp:base',
284 ],
285 'sources': [
286 'crash/app/breakpad_mac.h',
287 'crash/app/breakpad_mac_stubs.mm',
288 'crash/app/crash_reporter_client.cc',
289 'crash/app/crash_reporter_client.h',
290 ],
291 },
292 ],
293 }],
294 ['os_posix == 1 and OS != "mac" and OS != "ios"', {
295 'targets': [
296 {
297 # GN version: //components/crash/browser
298 'target_name': 'breakpad_host',
299 'type': 'static_library',
300 'dependencies': [
301 'crash_component',
302 '../base/base.gyp:base',
303 '../breakpad/breakpad.gyp:breakpad_client',
304 '../content/content.gyp:content_browser',
305 '../content/content.gyp:content_common',
306 ],
307 'sources': [
308 'crash/browser/crash_dump_manager_android.cc',
309 'crash/browser/crash_dump_manager_android.h',
310 'crash/browser/crash_handler_host_linux.cc',
311 'crash/browser/crash_handler_host_linux.h',
312 ],
313 'include_dirs': [
20 '../breakpad/src', 314 '../breakpad/src',
21 ], 315 ],
22 },
23 {
24 # TODO(mark): https://crbug.com/466890: merge this target with
25 # crash_component.
26 #
27 # This is a temporary base target that is depended on by both
28 # crash_component and crash_component_breakpad_mac_to_be_deleted. It
29 # provides everything common to both of those targets. For a short per iod,
30 # there are two Mac crash component implementations. The new one uses a
31 # Crashpad implementation and is used by Chrome. The old one uses a
32 # Breakpad implementation and is used by content_shell. Consumers shou ld
33 # depend on the desired target. All three targets behave identically o n
34 # non-Mac. When content_shell and any other consumers are migrated to the
35 # Crashpad implementation on Mac, crash_component will merge back into
36 # this target, crash_component_non_mac, which will be renamed
37 # crash_component. crash_component_breakpad_mac_to_be_deleted will be
38 # deleted.
39 #
40 # While this situation exists:
41 #
42 # Do not depend on this target directly! Depend on
43 # crash_component_breakpad_mac_to_be_deleted for old Breakpad behavior on
44 # all platforms, or preferably, depend on crash_component to get Break pad
45 # everywhere except for Mac, where you will get Crashpad.
46 'target_name': 'crash_component_non_mac',
47 'variables': {
48 'conditions': [
49 ['OS == "ios" or OS == "mac"', {
50 # On IOS there are no files compiled into the library, and we
51 # can't have libraries with zero objects.
52 # For now, the same applies to Mac OS X, until this target merge s
53 # with crash_component.
54 'crash_component_target_type%': 'none',
55 }, {
56 'crash_component_target_type%': 'static_library',
57 }],
58 ],
59 },
60 'type': '<(crash_component_target_type)',
61 'sources': [
62 'crash/content/app/breakpad_linux.cc',
63 'crash/content/app/breakpad_linux.h',
64 'crash/content/app/breakpad_linux_impl.h',
65 'crash/content/app/breakpad_win.cc',
66 'crash/content/app/breakpad_win.h',
67 'crash/content/app/hard_error_handler_win.cc',
68 'crash/content/app/hard_error_handler_win.h',
69 ],
70 'dependencies': [
71 'crash_component_lib',
72 '../base/base.gyp:base',
73 ],
74 'defines': ['CRASH_IMPLEMENTATION'],
75 'conditions': [
76 ['OS=="win"', {
77 'dependencies': [
78 '../breakpad/breakpad.gyp:breakpad_handler',
79 '../breakpad/breakpad.gyp:breakpad_sender',
80 '../sandbox/sandbox.gyp:sandbox',
81 ],
82 }],
83 ['os_posix == 1 and OS != "mac" and OS != "ios"', {
84 'dependencies': [
85 '../breakpad/breakpad.gyp:breakpad_client',
86 ],
87 'include_dirs': [
88 '../breakpad/src',
89 ],
90 }],
91 ],
92 'target_conditions': [ 316 'target_conditions': [
93 # Need 'target_conditions' to override default filename_rules to inc lude 317 # Need 'target_conditions' to override default filename_rules to inc lude
94 # the files on Android. 318 # the files on Android.
95 ['OS=="android"', { 319 ['OS=="android"', {
96 'sources/': [ 320 'sources/': [
97 ['include', '^crash/content/app/breakpad_linux\\.cc$'], 321 ['include', '^crash/browser/crash_handler_host_linux\\.cc$'],
98 ], 322 ],
99 }], 323 }],
100 ], 324 ],
101 }, 325 },
102 {
103 # Note: if you depend on this target, you need to either link in
104 # content.gyp:content_common, or add
105 # content/public/common/content_switches.cc to your sources.
106 #
107 # GN version: //components/crash/content/app
108
109 # TODO(mark): https://crbug.com/466890: merge this target with
110 # crash_component_non_mac.
111 #
112 # Most of this target is actually in its dependency,
113 # crash_component_non_mac. See the comment in that target for an
114 # explanation for the split. The split is temporary and the two target s
115 # will be unified again soon.
116 'target_name': 'crash_component',
117 'variables': {
118 'conditions': [
119 ['OS != "mac" ', {
120 # There are no source files on any platform but Mac OS X.
121 'crash_component_target_type%': 'none',
122 }, {
123 'crash_component_target_type%': 'static_library',
124 }],
125 ],
126 },
127 'type': '<(crash_component_target_type)',
128 'sources': [
129 'crash/content/app/crashpad_mac.h',
130 'crash/content/app/crashpad_mac.mm',
131 ],
132 'dependencies': [
133 'crash_component_non_mac',
134 'crash_component_lib',
135 '../base/base.gyp:base',
136 ],
137 'defines': ['CRASH_IMPLEMENTATION'],
138 'conditions': [
139 ['OS=="mac"', {
140 'dependencies': [
141 '../third_party/crashpad/crashpad/client/client.gyp:crashpad_cli ent',
142 ],
143 }],
144 ],
145 },
146 {
147 # TODO(mark): https://crbug.com/466890: remove this target.
148 #
149 # This is a temporary target provided for Mac Breakpad users that have not
150 # yet migrated to Crashpad (namely content_shell). This target will be
151 # removed shortly and all consumers will be expected to use Crashpad a s
152 # the Mac crash-reporting client. See the comment in the
153 # crash_component_non_mac target for more details.
154 'target_name': 'crash_component_breakpad_mac_to_be_deleted',
155 'variables': {
156 'conditions': [
157 ['OS != "mac" ', {
158 # There are no source files on any platform but Mac OS X.
159 'crash_component_target_type%': 'none',
160 }, {
161 'crash_component_target_type%': 'static_library',
162 }],
163 ],
164 },
165 'type': '<(crash_component_target_type)',
166 'sources': [
167 'crash/content/app/breakpad_mac.h',
168 'crash/content/app/breakpad_mac.mm',
169 ],
170 'dependencies': [
171 'crash_component_non_mac',
172 'crash_component_lib',
173 ],
174 'defines': ['CRASH_IMPLEMENTATION'],
175 'conditions': [
176 ['OS=="mac"', {
177 'dependencies': [
178 '../breakpad/breakpad.gyp:breakpad',
179 ],
180 'include_dirs': [
181 '..',
182 ],
183 }],
184 ],
185 },
186 {
187 # GN version: //components/crash/content/app:test_support
188 'target_name': 'crash_test_support',
189 'type': 'none',
190 'dependencies': [
191 'crash_component_lib',
192 ],
193 'direct_dependent_settings': {
194 'include_dirs' : [
195 '../breakpad/src',
196 ],
197 }
198 },
199 ],
200 'conditions': [
201 ['OS=="win"', {
202 'targets': [
203 {
204 # GN version: //components/crash/content/tools:crash_service
205 'target_name': 'breakpad_crash_service',
206 'type': 'static_library',
207 'dependencies': [
208 '../base/base.gyp:base',
209 '../breakpad/breakpad.gyp:breakpad_handler',
210 '../breakpad/breakpad.gyp:breakpad_sender',
211 ],
212 'sources': [
213 'crash/content/tools/crash_service.cc',
214 'crash/content/tools/crash_service.h',
215 ],
216 },
217 ],
218 }],
219 ['OS=="win" and target_arch=="ia32"', {
220 'targets': [
221 {
222 # Note: if you depend on this target, you need to either link in
223 # content.gyp:content_common, or add
224 # content/public/common/content_switches.cc to your sources.
225 'target_name': 'breakpad_win64',
226 'type': 'static_library',
227 'sources': [
228 'crash/content/app/breakpad_linux.cc',
229 'crash/content/app/breakpad_linux.h',
230 'crash/content/app/breakpad_linux_impl.h',
231 'crash/content/app/breakpad_mac.h',
232 'crash/content/app/breakpad_mac.mm',
233 'crash/content/app/breakpad_win.cc',
234 'crash/content/app/breakpad_win.h',
235 # TODO(siggi): test the x64 version too.
236 'crash/content/app/crash_keys_win.cc',
237 'crash/content/app/crash_keys_win.h',
238 'crash/content/app/crash_reporter_client.cc',
239 'crash/content/app/crash_reporter_client.h',
240 'crash/content/app/hard_error_handler_win.cc',
241 'crash/content/app/hard_error_handler_win.h',
242 ],
243 'defines': [
244 'COMPILE_CONTENT_STATICALLY',
245 'CRASH_IMPLEMENTATION',
246 ],
247 'dependencies': [
248 '../base/base.gyp:base_win64',
249 '../breakpad/breakpad.gyp:breakpad_handler_win64',
250 '../breakpad/breakpad.gyp:breakpad_sender_win64',
251 '../sandbox/sandbox.gyp:sandbox_win64',
252 ],
253 'configurations': {
254 'Common_Base': {
255 'msvs_target_platform': 'x64',
256 },
257 },
258 },
259 {
260 'target_name': 'breakpad_crash_service_win64',
261 'type': 'static_library',
262 'dependencies': [
263 '../base/base.gyp:base_win64',
264 '../breakpad/breakpad.gyp:breakpad_handler_win64',
265 '../breakpad/breakpad.gyp:breakpad_sender_win64',
266 ],
267 'sources': [
268 'crash/content/tools/crash_service.cc',
269 'crash/content/tools/crash_service.h',
270 ],
271 'configurations': {
272 'Common_Base': {
273 'msvs_target_platform': 'x64',
274 },
275 },
276 },
277 ],
278 }],
279 ['OS=="mac"', {
280 'targets': [
281 {
282 'target_name': 'breakpad_stubs',
283 'type': 'static_library',
284 'dependencies': [
285 '../base/base.gyp:base',
286 ],
287 'sources': [
288 'crash/content/app/breakpad_mac.h',
289 'crash/content/app/breakpad_mac_stubs.mm',
290 'crash/content/app/crash_reporter_client.cc',
291 'crash/content/app/crash_reporter_client.h',
292 ],
293 },
294 ],
295 }],
296 ['os_posix == 1 and OS != "mac"', {
297 'targets': [
298 {
299 # GN version: //components/crash/content/browser
300 'target_name': 'breakpad_host',
301 'type': 'static_library',
302 'dependencies': [
303 'crash_component',
304 '../base/base.gyp:base',
305 '../breakpad/breakpad.gyp:breakpad_client',
306 '../content/content.gyp:content_browser',
307 '../content/content.gyp:content_common',
308 ],
309 'sources': [
310 'crash/content/browser/crash_dump_manager_android.cc',
311 'crash/content/browser/crash_dump_manager_android.h',
312 'crash/content/browser/crash_handler_host_linux.cc',
313 'crash/content/browser/crash_handler_host_linux.h',
314 ],
315 'include_dirs': [
316 '../breakpad/src',
317 ],
318 'target_conditions': [
319 # Need 'target_conditions' to override default filename_rules to include
320 # the files on Android.
321 ['OS=="android"', {
322 'sources/': [
323 ['include', '^crash/content/browser/crash_handler_host_linux \\.cc$'],
324 ],
325 }],
326 ],
327 },
328 ],
329 }],
330 ], 326 ],
331 }], 327 }],
332 ], 328 ],
333 } 329 }
OLDNEW
« no previous file with comments | « components/components_tests.gyp ('k') | components/crash/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698