Android.bp 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. cc_defaults {
  2. name: "vold_default_flags",
  3. cflags: [
  4. "-Wall",
  5. "-Werror",
  6. "-Wextra",
  7. "-Wno-missing-field-initializers",
  8. "-Wno-unused-parameter",
  9. "-Wno-unused-variable",
  10. ],
  11. clang: true,
  12. tidy: true,
  13. tidy_checks: [
  14. "-*",
  15. "cert-*",
  16. "clang-analyzer-security*",
  17. "android-*",
  18. ],
  19. tidy_flags: [
  20. "-warnings-as-errors=clang-analyzer-security*,cert-*",
  21. ],
  22. }
  23. cc_defaults {
  24. name: "vold_default_libs",
  25. static_libs: [
  26. "libavb",
  27. "libbootloader_message",
  28. "libfec",
  29. "libfec_rs",
  30. "libfs_avb",
  31. "libfs_mgr",
  32. "libscrypt_static",
  33. "libsquashfs_utils",
  34. "libvold_binder",
  35. ],
  36. shared_libs: [
  37. "[email protected]",
  38. "[email protected]",
  39. "[email protected]",
  40. "libbase",
  41. "libbinder",
  42. "libcrypto",
  43. "libcrypto_utils",
  44. "libcutils",
  45. "libdiskconfig",
  46. "libext4_utils",
  47. "libf2fs_sparseblock",
  48. "libfscrypt",
  49. "libhardware",
  50. "libhardware_legacy",
  51. "libhidlbase",
  52. "libhwbinder",
  53. "libkeymaster4support",
  54. "libkeyutils",
  55. "liblog",
  56. "liblogwrap",
  57. "libselinux",
  58. "libsysutils",
  59. "libutils",
  60. ],
  61. }
  62. cc_library_static {
  63. name: "libvold_binder",
  64. defaults: ["vold_default_flags"],
  65. srcs: [
  66. ":vold_aidl",
  67. ],
  68. shared_libs: [
  69. "libbinder",
  70. "libutils",
  71. ],
  72. aidl: {
  73. local_include_dirs: ["binder"],
  74. include_dirs: ["frameworks/native/aidl/binder"],
  75. export_aidl_headers: true,
  76. },
  77. }
  78. cc_library_headers {
  79. name: "libvold_headers",
  80. export_include_dirs: ["."],
  81. }
  82. // Static library factored out to support testing
  83. cc_library_static {
  84. name: "libvold",
  85. defaults: [
  86. "vold_default_flags",
  87. "vold_default_libs",
  88. ],
  89. srcs: [
  90. "AppFuseUtil.cpp",
  91. "Benchmark.cpp",
  92. "CheckEncryption.cpp",
  93. "Checkpoint.cpp",
  94. "Devmapper.cpp",
  95. "EncryptInplace.cpp",
  96. "FileDeviceUtils.cpp",
  97. "FsCrypt.cpp",
  98. "IdleMaint.cpp",
  99. "KeyBuffer.cpp",
  100. "KeyStorage.cpp",
  101. "KeyUtil.cpp",
  102. "Keymaster.cpp",
  103. "Loop.cpp",
  104. "MetadataCrypt.cpp",
  105. "MoveStorage.cpp",
  106. "NetlinkHandler.cpp",
  107. "NetlinkManager.cpp",
  108. "Process.cpp",
  109. "ScryptParameters.cpp",
  110. "Utils.cpp",
  111. "VoldNativeService.cpp",
  112. "VoldUtil.cpp",
  113. "VolumeManager.cpp",
  114. "cryptfs.cpp",
  115. "fs/Exfat.cpp",
  116. "fs/Ext4.cpp",
  117. "fs/F2fs.cpp",
  118. "fs/Vfat.cpp",
  119. "model/Disk.cpp",
  120. "model/EmulatedVolume.cpp",
  121. "model/ObbVolume.cpp",
  122. "model/PrivateVolume.cpp",
  123. "model/PublicVolume.cpp",
  124. "model/VolumeBase.cpp",
  125. "model/StubVolume.cpp",
  126. ],
  127. product_variables: {
  128. arc: {
  129. exclude_srcs: [
  130. "AppFuseUtil.cpp",
  131. "model/ObbVolume.cpp",
  132. ],
  133. static_libs: [
  134. "arc_services_aidl",
  135. "libarcappfuse",
  136. "libarcobbvolume",
  137. ],
  138. },
  139. debuggable: {
  140. cppflags: ["-D__ANDROID_DEBUGGABLE__"],
  141. },
  142. },
  143. shared_libs: [
  144. "[email protected]",
  145. ],
  146. whole_static_libs: [
  147. "com.android.sysprop.apex",
  148. ],
  149. }
  150. cc_binary {
  151. name: "vold",
  152. defaults: [
  153. "vold_default_flags",
  154. "vold_default_libs",
  155. ],
  156. srcs: ["main.cpp"],
  157. static_libs: ["libvold"],
  158. product_variables: {
  159. arc: {
  160. static_libs: [
  161. "arc_services_aidl",
  162. "libarcappfuse",
  163. "libarcobbvolume",
  164. ],
  165. },
  166. },
  167. init_rc: [
  168. "vold.rc",
  169. "wait_for_keymaster.rc",
  170. ],
  171. required: [
  172. "mke2fs",
  173. "vold_prepare_subdirs",
  174. "wait_for_keymaster",
  175. ],
  176. shared_libs: [
  177. "[email protected]",
  178. "libhidltransport",
  179. ],
  180. }
  181. cc_binary {
  182. name: "vdc",
  183. defaults: ["vold_default_flags"],
  184. srcs: ["vdc.cpp"],
  185. shared_libs: [
  186. "libbase",
  187. "libbinder",
  188. "libcutils",
  189. "libutils",
  190. ],
  191. static_libs: [
  192. "libvold_binder",
  193. ],
  194. init_rc: ["vdc.rc"],
  195. }
  196. cc_binary {
  197. name: "wait_for_keymaster",
  198. defaults: ["vold_default_flags"],
  199. srcs: [
  200. "wait_for_keymaster.cpp",
  201. "Keymaster.cpp",
  202. ],
  203. shared_libs: [
  204. "libbase",
  205. "libbinder",
  206. "[email protected]",
  207. "[email protected]",
  208. "libhardware",
  209. "libhardware_legacy",
  210. "libhidlbase",
  211. "libhwbinder",
  212. "libkeymaster4support",
  213. ],
  214. }
  215. cc_binary {
  216. name: "secdiscard",
  217. defaults: ["vold_default_flags"],
  218. srcs: [
  219. "FileDeviceUtils.cpp",
  220. "secdiscard.cpp",
  221. ],
  222. shared_libs: ["libbase"],
  223. }
  224. cc_binary {
  225. name: "vold_prepare_subdirs",
  226. defaults: ["vold_default_flags"],
  227. srcs: ["vold_prepare_subdirs.cpp", "Utils.cpp"],
  228. shared_libs: [
  229. "libbase",
  230. "libcutils",
  231. "liblogwrap",
  232. "libselinux",
  233. "libutils",
  234. ],
  235. static_libs: [
  236. "libvold_binder",
  237. ],
  238. }
  239. filegroup {
  240. name: "vold_aidl",
  241. srcs: [
  242. "binder/android/os/IVold.aidl",
  243. "binder/android/os/IVoldListener.aidl",
  244. "binder/android/os/IVoldTaskListener.aidl",
  245. ],
  246. }
  247. subdirs = ["tests"]