Android.bp 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. cc_defaults {
  2. name: "installd_defaults",
  3. cflags: [
  4. "-Wall",
  5. "-Werror",
  6. "-Wextra",
  7. "-Wunreachable-code",
  8. "-Wunreachable-code-break",
  9. "-Wunreachable-code-return",
  10. ],
  11. srcs: [
  12. "CacheItem.cpp",
  13. "CacheTracker.cpp",
  14. "InstalldNativeService.cpp",
  15. "QuotaUtils.cpp",
  16. "dexopt.cpp",
  17. "globals.cpp",
  18. "utils.cpp",
  19. "utils_default.cpp",
  20. "view_compiler.cpp",
  21. ":installd_aidl",
  22. ],
  23. header_libs: [
  24. "dex2oat_headers",
  25. ],
  26. shared_libs: [
  27. "libbase",
  28. "libbinder",
  29. "libcrypto",
  30. "libcutils",
  31. "liblog",
  32. "liblogwrap",
  33. "libprocessgroup",
  34. "libselinux",
  35. "libutils",
  36. "server_configurable_flags",
  37. ],
  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. clang: true,
  53. tidy: true,
  54. tidy_checks: [
  55. "-*",
  56. "clang-analyzer-security*",
  57. "cert-*",
  58. "-cert-err58-cpp",
  59. ],
  60. tidy_flags: [
  61. "-warnings-as-errors=clang-analyzer-security*,cert-*"
  62. ],
  63. }
  64. //
  65. // Static library used in testing and executable
  66. //
  67. cc_library_static {
  68. name: "libinstalld",
  69. defaults: ["installd_defaults"],
  70. export_include_dirs: ["."],
  71. aidl: {
  72. export_aidl_headers: true,
  73. },
  74. product_variables: {
  75. arc: {
  76. exclude_srcs: [
  77. "QuotaUtils.cpp",
  78. ],
  79. static_libs: [
  80. "libarcdiskquota",
  81. "arc_services_aidl",
  82. ],
  83. cflags: [
  84. "-DUSE_ARC",
  85. ],
  86. },
  87. },
  88. }
  89. cc_library_headers {
  90. name: "libinstalld_headers",
  91. export_include_dirs: ["."],
  92. }
  93. //
  94. // Executable
  95. //
  96. cc_binary {
  97. name: "installd",
  98. defaults: ["installd_defaults"],
  99. srcs: ["installd.cpp"],
  100. static_libs: ["libdiskusage"],
  101. init_rc: ["installd.rc"],
  102. product_variables: {
  103. arc: {
  104. exclude_srcs: [
  105. "QuotaUtils.cpp",
  106. ],
  107. static_libs: [
  108. "libarcdiskquota",
  109. "arc_services_aidl",
  110. ],
  111. cflags: [
  112. "-DUSE_ARC",
  113. ],
  114. },
  115. },
  116. // Needs to be wherever installd is as it's execed by
  117. // installd.
  118. required: [ "migrate_legacy_obb_data.sh" ],
  119. }
  120. // OTA chroot tool
  121. cc_binary {
  122. name: "otapreopt_chroot",
  123. cflags: [
  124. "-Wall",
  125. "-Werror",
  126. ],
  127. clang: true,
  128. srcs: [
  129. "otapreopt_chroot.cpp",
  130. "otapreopt_utils.cpp",
  131. ],
  132. shared_libs: [
  133. "libbase",
  134. "libbinder",
  135. "liblog",
  136. "libprotobuf-cpp-full",
  137. "libselinux",
  138. "libutils",
  139. "libziparchive",
  140. ],
  141. static_libs: [
  142. "libapex",
  143. "libapexd",
  144. "lib_apex_manifest_proto",
  145. "libavb",
  146. "libdm",
  147. "libvold_binder",
  148. ],
  149. }
  150. filegroup {
  151. name: "installd_aidl",
  152. srcs: [
  153. "binder/android/os/IInstalld.aidl",
  154. ],
  155. }
  156. //
  157. // Static library for otapreopt used in testing
  158. //
  159. cc_library_static {
  160. name: "libotapreoptparameters",
  161. cflags: [
  162. "-Wall",
  163. "-Werror"
  164. ],
  165. srcs: ["otapreopt_parameters.cpp"],
  166. export_include_dirs: ["."],
  167. shared_libs: [
  168. "libbase",
  169. "libcutils",
  170. "liblog",
  171. "libprocessgroup",
  172. "libutils",
  173. ],
  174. }
  175. //
  176. // OTA Executable
  177. //
  178. cc_binary {
  179. name: "otapreopt",
  180. cflags: [
  181. "-Wall",
  182. "-Werror"
  183. ],
  184. srcs: [
  185. "dexopt.cpp",
  186. "globals.cpp",
  187. "otapreopt.cpp",
  188. "otapreopt_utils.cpp",
  189. "utils.cpp",
  190. "utils_default.cpp",
  191. "view_compiler.cpp",
  192. ],
  193. header_libs: ["dex2oat_headers"],
  194. static_libs: [
  195. "libartimagevalues",
  196. "libdiskusage",
  197. "libotapreoptparameters",
  198. ],
  199. shared_libs: [
  200. "libbase",
  201. "libcrypto",
  202. "libcutils",
  203. "liblog",
  204. "liblogwrap",
  205. "libprocessgroup",
  206. "libselinux",
  207. "libutils",
  208. "server_configurable_flags",
  209. ],
  210. }
  211. // OTA slot script
  212. sh_binary {
  213. name: "otapreopt_slot",
  214. src: "otapreopt_slot.sh",
  215. init_rc: ["otapreopt.rc"],
  216. }
  217. // OTA postinstall script
  218. sh_binary {
  219. name: "otapreopt_script",
  220. src: "otapreopt_script.sh",
  221. // Let this depend on otapreopt, the chroot tool and the slot script,
  222. // so we just have to mention one in a configuration.
  223. required: [
  224. "otapreopt",
  225. "otapreopt_chroot",
  226. "otapreopt_slot",
  227. ],
  228. }
  229. // Script to migrate legacy obb data.
  230. sh_binary {
  231. name: "migrate_legacy_obb_data.sh",
  232. src: "migrate_legacy_obb_data.sh"
  233. }