Index: components/crash/content/app/BUILD.gn |
diff --git a/components/crash/content/app/BUILD.gn b/components/crash/content/app/BUILD.gn |
index e0985c559c35bda415494669abc6678445c5fb91..b593f40a3f6cdc14af5870e059a6bd4213d98a73 100644 |
--- a/components/crash/content/app/BUILD.gn |
+++ b/components/crash/content/app/BUILD.gn |
@@ -24,9 +24,49 @@ source_set("lib") { |
# GYP version: components/crash.gypi:crash_component |
source_set("app") { |
sources = [ |
+ "crashpad_mac.h", |
+ "crashpad_mac.mm", |
+ ] |
+ |
+ defines = [ "CRASH_IMPLEMENTATION" ] |
+ |
+ deps = [ |
+ ":app_non_mac", |
+ "//base", |
+ ] |
+ |
+ if (is_mac) { |
+ deps += [ "//third_party/crashpad/crashpad/client" ] |
+ } |
+} |
+ |
+# TODO(mark): https://crbug.com/466890: merge this target with |
+# crash_component. |
+# |
+# This is a temporary base target that is depended on by both |
+# crash_component and crash_component_breakpad_mac_to_be_deleted. It |
+# provides everything common to both of those targets. For a short period, |
+# there are two Mac crash component implementations. The new one uses a |
+# Crashpad implementation and is used by Chrome. The old one uses a |
+# Breakpad implementation and is used by content_shell. Consumers should |
+# depend on the desired target. All three targets behave identically on |
+# non-Mac. When content_shell and any other consumers are migrated to the |
+# Crashpad implementation on Mac, crash_component will merge back into |
+# this target, crash_component_non_mac, which will be renamed |
+# crash_component. crash_component_breakpad_mac_to_be_deleted will be |
+# deleted. |
+# |
+# While this situation exists: |
+# |
+# Do not depend on this target directly! Depend on |
+# crash_component_breakpad_mac_to_be_deleted for old Breakpad behavior on |
+# all platforms, or preferably, depend on crash_component to get Breakpad |
+# everywhere except for Mac, where you will get Crashpad. |
+source_set("app_non_mac") { |
+ visibility = [ ":*" ] |
+ |
+ sources = [ |
"breakpad_linux_impl.h", |
- "breakpad_mac.h", |
- "breakpad_mac.mm", |
"breakpad_win.cc", |
"breakpad_win.h", |
"hard_error_handler_win.cc", |
@@ -49,18 +89,16 @@ source_set("app") { |
defines = [ "CRASH_IMPLEMENTATION" ] |
deps = [ |
+ ":lib", |
"//base", |
"//base:base_static", |
- ":lib", |
] |
if (is_android) { |
defines += [ "CHROME_BUILD_ID=" + android_chrome_build_id ] |
} |
- if (is_mac) { |
- deps += [ "//breakpad" ] |
- } else if (is_win) { |
+ if (is_win) { |
deps += [ |
"//sandbox", |
"//breakpad:breakpad_handler", |
@@ -72,8 +110,30 @@ source_set("app") { |
} |
} |
-source_set("test_support") { |
+# TODO(mark): https://crbug.com/466890: remove this target. |
+# |
+# This is a temporary target provided for Mac Breakpad users that have not |
+# yet migrated to Crashpad (namely content_shell). This target will be |
+# removed shortly and all consumers will be expected to use Crashpad as |
+# the Mac crash-reporting client. See the comment in the |
+# crash_component_non_mac target for more details. |
+source_set("app_breakpad_mac_to_be_deleted") { |
deps = [ |
- ":lib", |
+ ":app_non_mac", |
] |
+ |
+ if (is_mac) { |
+ sources = [ |
+ "breakpad_mac.h", |
+ "breakpad_mac.mm", |
+ ] |
+ |
+ defines = [ "CRASH_IMPLEMENTATION" ] |
+ |
+ deps += [ |
+ "//base", |
+ "//base:base_static", |
+ "//breakpad", |
+ ] |
+ } |
} |