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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/crash/core/common/crash_export.h » ('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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 static_library("common") { 5 group("common") {
6 public_deps = [
7 ":crash_keys",
8 ]
9
10 if (is_mac || is_ios) {
11 public_deps += [ ":zombies" ]
12 }
13 }
14
15 static_library("crash_keys") {
16 visibility = [ ":*" ]
17
6 sources = [ 18 sources = [
7 "crash_keys.cc", 19 "crash_keys.cc",
8 "crash_keys.h", 20 "crash_keys.h",
9 ] 21 ]
10 22
11 deps = [ 23 deps = [
12 "//base", 24 "//base",
13 ] 25 ]
26 }
14 27
15 if (is_mac || is_ios) { 28 if (is_mac || is_ios) {
16 sources += [ 29 component("zombies") {
30 visibility = [ ":common" ]
31
32 sources = [
33 "crash_keys.h",
17 "objc_zombie.h", 34 "objc_zombie.h",
18 "objc_zombie.mm", 35 "objc_zombie.mm",
19 ] 36 ]
37
38 defines = [ "CRASH_CORE_COMMON_IMPLEMENTATION" ]
39
40 deps = [
41 ":crash_keys",
42 "//base",
43 ]
44
45 libs = [ "Foundation.framework" ]
20 } 46 }
21 } 47 }
22 48
23 source_set("unit_tests") { 49 source_set("unit_tests") {
24 testonly = true 50 testonly = true
25 sources = [ 51 sources = [
26 "crash_keys_unittest.cc", 52 "crash_keys_unittest.cc",
27 ] 53 ]
28 54
29 deps = [ 55 deps = [
30 ":common", 56 ":common",
31 "//base", 57 "//base",
32 "//testing/gtest", 58 "//testing/gtest",
33 ] 59 ]
34 60
35 if (is_mac || is_ios) { 61 if (is_mac || is_ios) {
36 sources += [ "objc_zombie_unittest.mm" ] 62 sources += [ "objc_zombie_unittest.mm" ]
37 } 63 }
38 } 64 }
OLDNEW
« 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