| OLD | NEW |
| 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 } |
| OLD | NEW |