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", |
Risan | 5f30826 | 2018-10-26 12:06:58 -0600 | [diff] [blame] | 17 | "QuotaUtils.cpp", |
Jeff Sharkey | 6c2c056 | 2016-12-07 12:12:00 -0700 | [diff] [blame] | 18 | "dexopt.cpp", |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 19 | "globals.cpp", |
| 20 | "utils.cpp", |
Colin Cross | dd2dae9 | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 21 | ":installd_aidl", |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 22 | ], |
Andreas Gampe | fa2dadd | 2018-02-28 19:52:47 -0800 | [diff] [blame] | 23 | header_libs: [ |
| 24 | "dex2oat_headers", |
| 25 | ], |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 26 | shared_libs: [ |
| 27 | "libbase", |
| 28 | "libbinder", |
Alan Stokes | a25d90c | 2017-10-16 10:56:00 +0100 | [diff] [blame] | 29 | "libcrypto", |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 30 | "libcutils", |
| 31 | "liblog", |
| 32 | "liblogwrap", |
| 33 | "libselinux", |
| 34 | "libutils", |
| 35 | ], |
| 36 | |
Risan | d57852c | 2018-11-02 04:51:14 +0900 | [diff] [blame^] | 37 | product_variables: { |
| 38 | arc: { |
| 39 | exclude_srcs: [ |
| 40 | "QuotaUtils.cpp", |
| 41 | ], |
| 42 | static_libs: [ |
| 43 | "libarcdiskquota", |
| 44 | "arc_services_aidl", |
| 45 | ], |
| 46 | cflags: [ |
| 47 | "-DUSE_ARC", |
| 48 | ], |
| 49 | }, |
| 50 | }, |
| 51 | |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 52 | clang: true, |
Jeff Sharkey | c1149c9 | 2017-09-21 14:51:09 -0600 | [diff] [blame] | 53 | |
| 54 | tidy: true, |
| 55 | tidy_checks: [ |
| 56 | "-*", |
| 57 | "clang-analyzer-security*", |
| 58 | "cert-*", |
| 59 | "-cert-err58-cpp", |
| 60 | ], |
| 61 | tidy_flags: [ |
| 62 | "-warnings-as-errors=clang-analyzer-security*,cert-*" |
| 63 | ], |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | // |
| 67 | // Static library used in testing and executable |
| 68 | // |
| 69 | |
| 70 | cc_library_static { |
| 71 | name: "libinstalld", |
| 72 | defaults: ["installd_defaults"], |
| 73 | |
| 74 | export_include_dirs: ["."], |
| 75 | aidl: { |
| 76 | export_aidl_headers: true, |
| 77 | }, |
Risan | d57852c | 2018-11-02 04:51:14 +0900 | [diff] [blame^] | 78 | |
| 79 | product_variables: { |
| 80 | arc: { |
| 81 | exclude_srcs: [ |
| 82 | "QuotaUtils.cpp", |
| 83 | ], |
| 84 | static_libs: [ |
| 85 | "libarcdiskquota", |
| 86 | "arc_services_aidl", |
| 87 | ], |
| 88 | cflags: [ |
| 89 | "-DUSE_ARC", |
| 90 | ], |
| 91 | }, |
| 92 | }, |
| 93 | } |
| 94 | |
| 95 | cc_library_headers { |
| 96 | name: "libinstalld_headers", |
| 97 | export_include_dirs: ["."], |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 98 | } |
| 99 | |
| 100 | // |
| 101 | // Executable |
| 102 | // |
| 103 | |
| 104 | cc_binary { |
| 105 | name: "installd", |
| 106 | defaults: ["installd_defaults"], |
| 107 | srcs: ["installd.cpp"], |
| 108 | |
| 109 | static_libs: ["libdiskusage"], |
| 110 | |
| 111 | init_rc: ["installd.rc"], |
Risan | d57852c | 2018-11-02 04:51:14 +0900 | [diff] [blame^] | 112 | |
| 113 | product_variables: { |
| 114 | arc: { |
| 115 | exclude_srcs: [ |
| 116 | "QuotaUtils.cpp", |
| 117 | ], |
| 118 | static_libs: [ |
| 119 | "libarcdiskquota", |
| 120 | "arc_services_aidl", |
| 121 | ], |
| 122 | cflags: [ |
| 123 | "-DUSE_ARC", |
| 124 | ], |
| 125 | }, |
| 126 | }, |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 127 | } |
| 128 | |
Dan Willemsen | 2a001e8 | 2016-08-05 14:06:41 -0700 | [diff] [blame] | 129 | // OTA chroot tool |
| 130 | |
| 131 | cc_binary { |
| 132 | name: "otapreopt_chroot", |
| 133 | cflags: [ |
| 134 | "-Wall", |
| 135 | "-Werror", |
| 136 | ], |
| 137 | clang: true, |
| 138 | |
| 139 | srcs: ["otapreopt_chroot.cpp"], |
| 140 | shared_libs: [ |
| 141 | "libbase", |
| 142 | "liblog", |
| 143 | ], |
| 144 | } |
Dan Willemsen | 4c93974 | 2016-12-06 15:44:57 -0800 | [diff] [blame] | 145 | |
Colin Cross | dd2dae9 | 2017-11-14 13:05:37 -0800 | [diff] [blame] | 146 | filegroup { |
| 147 | name: "installd_aidl", |
| 148 | srcs: [ |
| 149 | "binder/android/os/IInstalld.aidl", |
| 150 | ], |
| 151 | } |
| 152 | |
Calin Juravle | dff4729 | 2018-02-01 14:44:56 +0000 | [diff] [blame] | 153 | // |
| 154 | // Static library for otapreopt used in testing |
| 155 | // |
| 156 | cc_library_static { |
| 157 | name: "libotapreoptparameters", |
| 158 | cflags: [ |
| 159 | "-Wall", |
| 160 | "-Werror" |
| 161 | ], |
Calin Juravle | dff4729 | 2018-02-01 14:44:56 +0000 | [diff] [blame] | 162 | |
Andreas Gampe | ce9fe7f | 2018-09-18 10:25:58 -0700 | [diff] [blame] | 163 | srcs: ["otapreopt_parameters.cpp"], |
Calin Juravle | dff4729 | 2018-02-01 14:44:56 +0000 | [diff] [blame] | 164 | |
| 165 | export_include_dirs: ["."], |
| 166 | |
| 167 | shared_libs: [ |
| 168 | "libbase", |
| 169 | "libcutils", |
| 170 | "liblog", |
| 171 | "libutils", |
| 172 | ], |
| 173 | } |
| 174 | |
Andreas Gampe | ce9fe7f | 2018-09-18 10:25:58 -0700 | [diff] [blame] | 175 | // |
| 176 | // OTA Executable |
| 177 | // |
| 178 | |
| 179 | cc_binary { |
| 180 | name: "otapreopt", |
| 181 | cflags: [ |
| 182 | "-Wall", |
| 183 | "-Werror" |
| 184 | ], |
| 185 | |
| 186 | srcs: [ |
| 187 | "dexopt.cpp", |
| 188 | "globals.cpp", |
| 189 | "otapreopt.cpp", |
| 190 | "utils.cpp", |
| 191 | ], |
| 192 | |
| 193 | header_libs: ["dex2oat_headers"], |
| 194 | |
| 195 | static_libs: [ |
| 196 | "libartimagevalues", |
| 197 | "libdiskusage", |
| 198 | "libotapreoptparameters", |
| 199 | ], |
| 200 | |
| 201 | shared_libs: [ |
| 202 | "libbase", |
| 203 | "libcrypto", |
| 204 | "libcutils", |
| 205 | "liblog", |
| 206 | "liblogwrap", |
| 207 | "libselinux", |
| 208 | "libutils", |
| 209 | ], |
| 210 | } |