Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 1 | cc_defaults { |
| 2 | name: "installd_defaults", |
| 3 | |
| 4 | cflags: [ |
| 5 | "-Wall", |
| 6 | "-Werror", |
Jeff Sharkey | c1149c9 | 2017-09-21 14:51:09 -0600 | [diff] [blame] | 7 | "-Wextra", |
Andreas Gampe | fa2dadd | 2018-02-28 19:52:47 -0800 | [diff] [blame] | 8 | |
| 9 | "-Wunreachable-code", |
| 10 | "-Wunreachable-code-break", |
| 11 | "-Wunreachable-code-return", |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 12 | ], |
| 13 | srcs: [ |
Jeff Sharkey | 88ddd94 | 2017-01-17 18:05:54 -0700 | [diff] [blame] | 14 | "CacheItem.cpp", |
| 15 | "CacheTracker.cpp", |
Jeff Sharkey | f3e30b9 | 2016-12-09 17:06:57 -0700 | [diff] [blame] | 16 | "InstalldNativeService.cpp", |
Jeff Sharkey | 6c2c056 | 2016-12-07 12:12:00 -0700 | [diff] [blame] | 17 | "dexopt.cpp", |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 18 | "globals.cpp", |
| 19 | "utils.cpp", |
Colin Cross | dd2dae9 | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 20 | ":installd_aidl", |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 21 | ], |
Andreas Gampe | fa2dadd | 2018-02-28 19:52:47 -0800 | [diff] [blame] | 22 | header_libs: [ |
| 23 | "dex2oat_headers", |
| 24 | ], |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 25 | shared_libs: [ |
| 26 | "libbase", |
| 27 | "libbinder", |
Alan Stokes | a25d90c | 2017-10-16 10:56:00 +0100 | [diff] [blame] | 28 | "libcrypto", |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 29 | "libcutils", |
| 30 | "liblog", |
| 31 | "liblogwrap", |
| 32 | "libselinux", |
| 33 | "libutils", |
| 34 | ], |
| 35 | |
| 36 | clang: true, |
Jeff Sharkey | c1149c9 | 2017-09-21 14:51:09 -0600 | [diff] [blame] | 37 | |
| 38 | tidy: true, |
| 39 | tidy_checks: [ |
| 40 | "-*", |
| 41 | "clang-analyzer-security*", |
| 42 | "cert-*", |
| 43 | "-cert-err58-cpp", |
| 44 | ], |
| 45 | tidy_flags: [ |
| 46 | "-warnings-as-errors=clang-analyzer-security*,cert-*" |
| 47 | ], |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | // |
| 51 | // Static library used in testing and executable |
| 52 | // |
| 53 | |
| 54 | cc_library_static { |
| 55 | name: "libinstalld", |
| 56 | defaults: ["installd_defaults"], |
| 57 | |
| 58 | export_include_dirs: ["."], |
| 59 | aidl: { |
| 60 | export_aidl_headers: true, |
| 61 | }, |
| 62 | } |
| 63 | |
| 64 | // |
| 65 | // Executable |
| 66 | // |
| 67 | |
| 68 | cc_binary { |
| 69 | name: "installd", |
| 70 | defaults: ["installd_defaults"], |
| 71 | srcs: ["installd.cpp"], |
| 72 | |
| 73 | static_libs: ["libdiskusage"], |
| 74 | |
| 75 | init_rc: ["installd.rc"], |
| 76 | } |
| 77 | |
Dan Willemsen | 2a001e8 | 2016-08-05 14:06:41 -0700 | [diff] [blame] | 78 | // OTA chroot tool |
| 79 | |
| 80 | cc_binary { |
| 81 | name: "otapreopt_chroot", |
| 82 | cflags: [ |
| 83 | "-Wall", |
| 84 | "-Werror", |
| 85 | ], |
| 86 | clang: true, |
| 87 | |
| 88 | srcs: ["otapreopt_chroot.cpp"], |
| 89 | shared_libs: [ |
| 90 | "libbase", |
| 91 | "liblog", |
| 92 | ], |
| 93 | } |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 94 | |
Colin Cross | dd2dae9 | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 95 | filegroup { |
| 96 | name: "installd_aidl", |
| 97 | srcs: [ |
| 98 | "binder/android/os/IInstalld.aidl", |
| 99 | ], |
| 100 | } |
| 101 | |
Calin Juravle | dff4729 | 2018-02-01 14:44:56 +0000 | [diff] [blame] | 102 | // |
| 103 | // Static library for otapreopt used in testing |
| 104 | // |
| 105 | cc_library_static { |
| 106 | name: "libotapreoptparameters", |
| 107 | cflags: [ |
| 108 | "-Wall", |
| 109 | "-Werror" |
| 110 | ], |
Calin Juravle | dff4729 | 2018-02-01 14:44:56 +0000 | [diff] [blame] | 111 | |
Andreas Gampe | ce9fe7f | 2018-09-18 10:25:58 -0700 | [diff] [blame^] | 112 | srcs: ["otapreopt_parameters.cpp"], |
Calin Juravle | dff4729 | 2018-02-01 14:44:56 +0000 | [diff] [blame] | 113 | |
| 114 | export_include_dirs: ["."], |
| 115 | |
| 116 | shared_libs: [ |
| 117 | "libbase", |
| 118 | "libcutils", |
| 119 | "liblog", |
| 120 | "libutils", |
| 121 | ], |
| 122 | } |
| 123 | |
Andreas Gampe | ce9fe7f | 2018-09-18 10:25:58 -0700 | [diff] [blame^] | 124 | // |
| 125 | // OTA Executable |
| 126 | // |
| 127 | |
| 128 | cc_binary { |
| 129 | name: "otapreopt", |
| 130 | cflags: [ |
| 131 | "-Wall", |
| 132 | "-Werror" |
| 133 | ], |
| 134 | |
| 135 | srcs: [ |
| 136 | "dexopt.cpp", |
| 137 | "globals.cpp", |
| 138 | "otapreopt.cpp", |
| 139 | "utils.cpp", |
| 140 | ], |
| 141 | |
| 142 | header_libs: ["dex2oat_headers"], |
| 143 | |
| 144 | static_libs: [ |
| 145 | "libartimagevalues", |
| 146 | "libdiskusage", |
| 147 | "libotapreoptparameters", |
| 148 | ], |
| 149 | |
| 150 | shared_libs: [ |
| 151 | "libbase", |
| 152 | "libcrypto", |
| 153 | "libcutils", |
| 154 | "liblog", |
| 155 | "liblogwrap", |
| 156 | "libselinux", |
| 157 | "libutils", |
| 158 | ], |
| 159 | } |