OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 if (is_android) { | 5 if (is_android) { |
6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
7 } | 7 } |
8 | 8 |
9 source_set("lib") { | 9 source_set("lib") { |
10 sources = [ | 10 sources = [ |
11 "crash_keys_win.cc", | 11 "crash_keys_win.cc", |
12 "crash_keys_win.h", | 12 "crash_keys_win.h", |
13 "crash_reporter_client.cc", | 13 "crash_reporter_client.cc", |
14 "crash_reporter_client.h", | 14 "crash_reporter_client.h", |
15 ] | 15 ] |
16 | 16 |
17 include_dirs = [ "../../../../breakpad/src" ] | 17 include_dirs = [ "../../../../breakpad/src" ] |
18 } | 18 } |
19 | 19 |
20 # Note: if you depend on this target, you need to either link in | 20 # Note: if you depend on this target, you need to either link in |
21 # content.gyp:content_common, or add content/public/common/content_switches.cc | 21 # content.gyp:content_common, or add content/public/common/content_switches.cc |
22 # to your sources. | 22 # to your sources. |
23 # | 23 # |
24 # GYP version: components/crash.gypi:crash_component | 24 # GYP version: components/crash.gypi:crash_component |
25 source_set("app") { | 25 source_set("app") { |
26 sources = [ | 26 sources = [ |
| 27 "crashpad_mac.h", |
| 28 "crashpad_mac.mm", |
| 29 ] |
| 30 |
| 31 defines = [ "CRASH_IMPLEMENTATION" ] |
| 32 |
| 33 deps = [ |
| 34 ":app_non_mac", |
| 35 "//base", |
| 36 ] |
| 37 |
| 38 if (is_mac) { |
| 39 deps += [ "//third_party/crashpad/crashpad/client" ] |
| 40 } |
| 41 } |
| 42 |
| 43 # TODO(mark): https://crbug.com/466890: merge this target with |
| 44 # crash_component. |
| 45 # |
| 46 # This is a temporary base target that is depended on by both |
| 47 # crash_component and crash_component_breakpad_mac_to_be_deleted. It |
| 48 # provides everything common to both of those targets. For a short period, |
| 49 # there are two Mac crash component implementations. The new one uses a |
| 50 # Crashpad implementation and is used by Chrome. The old one uses a |
| 51 # Breakpad implementation and is used by content_shell. Consumers should |
| 52 # depend on the desired target. All three targets behave identically on |
| 53 # non-Mac. When content_shell and any other consumers are migrated to the |
| 54 # Crashpad implementation on Mac, crash_component will merge back into |
| 55 # this target, crash_component_non_mac, which will be renamed |
| 56 # crash_component. crash_component_breakpad_mac_to_be_deleted will be |
| 57 # deleted. |
| 58 # |
| 59 # While this situation exists: |
| 60 # |
| 61 # Do not depend on this target directly! Depend on |
| 62 # crash_component_breakpad_mac_to_be_deleted for old Breakpad behavior on |
| 63 # all platforms, or preferably, depend on crash_component to get Breakpad |
| 64 # everywhere except for Mac, where you will get Crashpad. |
| 65 source_set("app_non_mac") { |
| 66 visibility = [ ":*" ] |
| 67 |
| 68 sources = [ |
27 "breakpad_linux_impl.h", | 69 "breakpad_linux_impl.h", |
28 "breakpad_mac.h", | |
29 "breakpad_mac.mm", | |
30 "breakpad_win.cc", | 70 "breakpad_win.cc", |
31 "breakpad_win.h", | 71 "breakpad_win.h", |
32 "hard_error_handler_win.cc", | 72 "hard_error_handler_win.cc", |
33 "hard_error_handler_win.h", | 73 "hard_error_handler_win.h", |
34 ] | 74 ] |
35 | 75 |
36 if (is_android) { | 76 if (is_android) { |
37 libs = [ "log" ] | 77 libs = [ "log" ] |
38 } | 78 } |
39 | 79 |
40 if (is_android || is_linux) { | 80 if (is_android || is_linux) { |
41 # Want these files on both Linux and Android. | 81 # Want these files on both Linux and Android. |
42 set_sources_assignment_filter([]) | 82 set_sources_assignment_filter([]) |
43 sources += [ | 83 sources += [ |
44 "breakpad_linux.cc", | 84 "breakpad_linux.cc", |
45 "breakpad_linux.h", | 85 "breakpad_linux.h", |
46 ] | 86 ] |
47 } | 87 } |
48 | 88 |
49 defines = [ "CRASH_IMPLEMENTATION" ] | 89 defines = [ "CRASH_IMPLEMENTATION" ] |
50 | 90 |
51 deps = [ | 91 deps = [ |
| 92 ":lib", |
52 "//base", | 93 "//base", |
53 "//base:base_static", | 94 "//base:base_static", |
54 ":lib", | |
55 ] | 95 ] |
56 | 96 |
57 if (is_android) { | 97 if (is_android) { |
58 defines += [ "CHROME_BUILD_ID=" + android_chrome_build_id ] | 98 defines += [ "CHROME_BUILD_ID=" + android_chrome_build_id ] |
59 } | 99 } |
60 | 100 |
61 if (is_mac) { | 101 if (is_win) { |
62 deps += [ "//breakpad" ] | |
63 } else if (is_win) { | |
64 deps += [ | 102 deps += [ |
65 "//sandbox", | 103 "//sandbox", |
66 "//breakpad:breakpad_handler", | 104 "//breakpad:breakpad_handler", |
67 | 105 |
68 #'../breakpad/breakpad.gyp:breakpad_sender', TODO(GYP) | 106 #'../breakpad/breakpad.gyp:breakpad_sender', TODO(GYP) |
69 ] | 107 ] |
70 } else if (is_posix && !is_ios) { | 108 } else if (is_posix && !is_ios) { |
71 deps += [ "//breakpad:client" ] | 109 deps += [ "//breakpad:client" ] |
72 } | 110 } |
73 } | 111 } |
74 | 112 |
75 source_set("test_support") { | 113 # TODO(mark): https://crbug.com/466890: remove this target. |
| 114 # |
| 115 # This is a temporary target provided for Mac Breakpad users that have not |
| 116 # yet migrated to Crashpad (namely content_shell). This target will be |
| 117 # removed shortly and all consumers will be expected to use Crashpad as |
| 118 # the Mac crash-reporting client. See the comment in the |
| 119 # crash_component_non_mac target for more details. |
| 120 source_set("app_breakpad_mac_to_be_deleted") { |
76 deps = [ | 121 deps = [ |
77 ":lib", | 122 ":app_non_mac", |
78 ] | 123 ] |
| 124 |
| 125 if (is_mac) { |
| 126 sources = [ |
| 127 "breakpad_mac.h", |
| 128 "breakpad_mac.mm", |
| 129 ] |
| 130 |
| 131 defines = [ "CRASH_IMPLEMENTATION" ] |
| 132 |
| 133 deps += [ |
| 134 "//base", |
| 135 "//base:base_static", |
| 136 "//breakpad", |
| 137 ] |
| 138 } |
79 } | 139 } |
OLD | NEW |