| 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 |
| 19 deps = [ |
| 20 "//base", |
| 21 ] |
| 22 |
| 23 if (is_win) { |
| 24 deps += [ "//breakpad:breakpad_handler" ] |
| 25 } |
| 18 } | 26 } |
| 19 | 27 |
| 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 | |
| 22 # to your sources. | |
| 23 # | |
| 24 # GYP version: components/crash.gypi:crash_component | 28 # GYP version: components/crash.gypi:crash_component |
| 25 source_set("app") { | 29 source_set("app") { |
| 26 sources = [ | 30 sources = [ |
| 27 "crashpad_mac.h", | 31 "crashpad_mac.h", |
| 28 "crashpad_mac.mm", | 32 "crashpad_mac.mm", |
| 29 ] | 33 ] |
| 30 | 34 |
| 31 defines = [ "CRASH_IMPLEMENTATION" ] | 35 defines = [ "CRASH_IMPLEMENTATION" ] |
| 32 | 36 |
| 33 public_deps = [ | 37 public_deps = [ |
| 34 ":app_non_mac", | 38 ":app_non_mac", |
| 35 ] | 39 ] |
| 36 deps = [ | 40 deps = [ |
| 37 "//base", | 41 "//base", |
| 38 ] | 42 ] |
| 39 | 43 |
| 40 if (is_mac) { | 44 if (is_mac) { |
| 41 deps += [ "//third_party/crashpad/crashpad/client" ] | 45 deps += [ |
| 46 ":lib", |
| 47 "//third_party/crashpad/crashpad/client", |
| 48 ] |
| 42 } | 49 } |
| 43 } | 50 } |
| 44 | 51 |
| 45 # TODO(mark): https://crbug.com/466890: merge this target with | 52 # TODO(mark): https://crbug.com/466890: merge this target with |
| 46 # crash_component. | 53 # crash_component. |
| 47 # | 54 # |
| 48 # This is a temporary base target that is depended on by both | 55 # This is a temporary base target that is depended on by both |
| 49 # crash_component and crash_component_breakpad_mac_to_be_deleted. It | 56 # crash_component and crash_component_breakpad_mac_to_be_deleted. It |
| 50 # provides everything common to both of those targets. For a short period, | 57 # provides everything common to both of those targets. For a short period, |
| 51 # there are two Mac crash component implementations. The new one uses a | 58 # there are two Mac crash component implementations. The new one uses a |
| 52 # Crashpad implementation and is used by Chrome. The old one uses a | 59 # Crashpad implementation and is used by Chrome. The old one uses a |
| 53 # Breakpad implementation and is used by content_shell. Consumers should | 60 # Breakpad implementation and is used by content_shell. Consumers should |
| 54 # depend on the desired target. All three targets behave identically on | 61 # depend on the desired target. All three targets behave identically on |
| 55 # non-Mac. When content_shell and any other consumers are migrated to the | 62 # non-Mac. When content_shell and any other consumers are migrated to the |
| 56 # Crashpad implementation on Mac, crash_component will merge back into | 63 # Crashpad implementation on Mac, crash_component will merge back into |
| 57 # this target, crash_component_non_mac, which will be renamed | 64 # this target, crash_component_non_mac, which will be renamed |
| 58 # crash_component. crash_component_breakpad_mac_to_be_deleted will be | 65 # crash_component. crash_component_breakpad_mac_to_be_deleted will be |
| 59 # deleted. | 66 # deleted. |
| 60 # | 67 # |
| 61 # While this situation exists: | 68 # While this situation exists: |
| 62 # | 69 # |
| 63 # Do not depend on this target directly! Depend on | 70 # Do not depend on this target directly! Depend on |
| 64 # crash_component_breakpad_mac_to_be_deleted for old Breakpad behavior on | 71 # crash_component_breakpad_mac_to_be_deleted for old Breakpad behavior on |
| 65 # all platforms, or preferably, depend on crash_component to get Breakpad | 72 # all platforms, or preferably, depend on crash_component to get Breakpad |
| 66 # everywhere except for Mac, where you will get Crashpad. | 73 # everywhere except for Mac, where you will get Crashpad. |
| 67 source_set("app_non_mac") { | 74 source_set("app_non_mac") { |
| 68 visibility = [ ":*" ] | 75 visibility = [ |
| 76 ":*", |
| 77 "//components/crash/content/browser", |
| 78 ] |
| 69 | 79 |
| 70 sources = [ | 80 sources = [ |
| 71 "breakpad_linux_impl.h", | 81 "breakpad_linux_impl.h", |
| 72 "breakpad_win.cc", | 82 "breakpad_win.cc", |
| 73 "breakpad_win.h", | 83 "breakpad_win.h", |
| 74 "hard_error_handler_win.cc", | 84 "hard_error_handler_win.cc", |
| 75 "hard_error_handler_win.h", | 85 "hard_error_handler_win.h", |
| 76 ] | 86 ] |
| 77 | 87 |
| 78 if (is_android) { | 88 if (is_android) { |
| 79 libs = [ "log" ] | 89 libs = [ "log" ] |
| 80 } | 90 } |
| 81 | 91 |
| 82 if (is_android || is_linux) { | 92 if (is_android || is_linux) { |
| 83 # Want these files on both Linux and Android. | 93 # Want these files on both Linux and Android. |
| 84 set_sources_assignment_filter([]) | 94 set_sources_assignment_filter([]) |
| 85 sources += [ | 95 sources += [ |
| 86 "breakpad_linux.cc", | 96 "breakpad_linux.cc", |
| 87 "breakpad_linux.h", | 97 "breakpad_linux.h", |
| 88 ] | 98 ] |
| 89 } | 99 } |
| 90 | 100 |
| 91 defines = [ "CRASH_IMPLEMENTATION" ] | 101 defines = [ "CRASH_IMPLEMENTATION" ] |
| 92 | 102 |
| 93 deps = [ | 103 deps = [ |
| 94 ":lib", | 104 ":lib", |
| 95 "//base", | 105 "//base", |
| 96 "//base:base_static", | 106 "//base:base_static", |
| 107 "//components/crash/core/common", |
| 108 "//content/public/common:content_descriptors", |
| 109 "//content/public/common:result_codes", |
| 97 ] | 110 ] |
| 98 | 111 |
| 99 if (is_android) { | 112 if (is_android) { |
| 100 defines += [ "CHROME_BUILD_ID=" + android_chrome_build_id ] | 113 defines += [ "CHROME_BUILD_ID=" + android_chrome_build_id ] |
| 101 } | 114 } |
| 102 | 115 |
| 103 if (is_win) { | 116 if (is_win) { |
| 104 deps += [ | 117 deps += [ |
| 105 "//sandbox", | 118 "//sandbox", |
| 106 "//breakpad:breakpad_handler", | 119 "//breakpad:breakpad_handler", |
| (...skipping 19 matching lines...) Expand all Loading... |
| 126 | 139 |
| 127 if (is_mac) { | 140 if (is_mac) { |
| 128 sources = [ | 141 sources = [ |
| 129 "breakpad_mac.h", | 142 "breakpad_mac.h", |
| 130 "breakpad_mac.mm", | 143 "breakpad_mac.mm", |
| 131 ] | 144 ] |
| 132 | 145 |
| 133 defines = [ "CRASH_IMPLEMENTATION" ] | 146 defines = [ "CRASH_IMPLEMENTATION" ] |
| 134 | 147 |
| 135 deps += [ | 148 deps += [ |
| 149 ":lib", |
| 136 "//base", | 150 "//base", |
| 137 "//base:base_static", | 151 "//base:base_static", |
| 138 "//breakpad", | 152 "//breakpad", |
| 139 "//breakpad:client", | 153 "//breakpad:client", |
| 154 "//components/crash/core/common", |
| 140 ] | 155 ] |
| 141 } | 156 } |
| 142 } | 157 } |
| OLD | NEW |