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

Unified Diff: components/crash/core/common/BUILD.gn

Issue 2148803003: Componentize zombies to silence ObjC runtime errors in component builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tighten visibility, explicitly use header, shorten IMPLEMENTATION macro Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/crash/core/common/crash_export.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/crash/core/common/BUILD.gn
diff --git a/components/crash/core/common/BUILD.gn b/components/crash/core/common/BUILD.gn
index 3714a2380a5421b85626d2d8143760f2ef4870b9..6cfc0fd0d6fc4290a0cfa9b14b7f278b8c4e418d 100644
--- a/components/crash/core/common/BUILD.gn
+++ b/components/crash/core/common/BUILD.gn
@@ -2,7 +2,19 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-static_library("common") {
+group("common") {
+ public_deps = [
+ ":crash_keys",
+ ]
+
+ if (is_mac || is_ios) {
+ public_deps += [ ":zombies" ]
+ }
+}
+
+static_library("crash_keys") {
+ visibility = [ ":*" ]
+
sources = [
"crash_keys.cc",
"crash_keys.h",
@@ -11,12 +23,26 @@ static_library("common") {
deps = [
"//base",
]
+}
- if (is_mac || is_ios) {
- sources += [
+if (is_mac || is_ios) {
+ component("zombies") {
+ visibility = [ ":common" ]
+
+ sources = [
+ "crash_keys.h",
"objc_zombie.h",
"objc_zombie.mm",
]
+
+ defines = [ "CRASH_CORE_COMMON_IMPLEMENTATION" ]
+
+ deps = [
+ ":crash_keys",
+ "//base",
+ ]
+
+ libs = [ "Foundation.framework" ]
}
}
« no previous file with comments | « no previous file | components/crash/core/common/crash_export.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698