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