Android.bp 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. //
  2. // Copyright (C) 2017 The Android Open Source Project
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. cc_defaults {
  17. name: "fs_mgr_defaults",
  18. sanitize: {
  19. misc_undefined: ["integer"],
  20. },
  21. local_include_dirs: ["include/"],
  22. cflags: [
  23. "-Wall",
  24. "-Werror",
  25. ],
  26. }
  27. cc_library {
  28. // Do not ever allow this library to be vendor_available as a shared library.
  29. // It does not have a stable interface.
  30. name: "libfs_mgr",
  31. defaults: ["fs_mgr_defaults"],
  32. recovery_available: true,
  33. export_include_dirs: ["include"],
  34. include_dirs: ["system/vold"],
  35. srcs: [
  36. "fs_mgr.cpp",
  37. "fs_mgr_format.cpp",
  38. "fs_mgr_verity.cpp",
  39. "fs_mgr_dm_linear.cpp",
  40. "fs_mgr_overlayfs.cpp",
  41. "fs_mgr_roots.cpp",
  42. "fs_mgr_vendor_overlay.cpp",
  43. ],
  44. shared_libs: [
  45. "libbase",
  46. "libcrypto",
  47. "libcrypto_utils",
  48. "libcutils",
  49. "libext4_utils",
  50. "libfec",
  51. "liblog",
  52. "liblp",
  53. "libselinux",
  54. ],
  55. static_libs: [
  56. "libavb",
  57. "libfs_avb",
  58. "libfstab",
  59. "libdm",
  60. "libgsi",
  61. ],
  62. export_static_lib_headers: [
  63. "libfs_avb",
  64. "libfstab",
  65. "libdm",
  66. ],
  67. export_shared_lib_headers: [
  68. "liblp",
  69. ],
  70. whole_static_libs: [
  71. "liblogwrap",
  72. "libdm",
  73. "libfstab",
  74. ],
  75. cppflags: [
  76. "-DALLOW_ADBD_DISABLE_VERITY=0",
  77. ],
  78. product_variables: {
  79. debuggable: {
  80. cppflags: [
  81. "-UALLOW_ADBD_DISABLE_VERITY",
  82. "-DALLOW_ADBD_DISABLE_VERITY=1",
  83. ],
  84. },
  85. },
  86. }
  87. cc_library_static {
  88. // Do not ever make this a shared library as long as it is vendor_available.
  89. // It does not have a stable interface.
  90. name: "libfstab",
  91. vendor_available: true,
  92. recovery_available: true,
  93. host_supported: true,
  94. defaults: ["fs_mgr_defaults"],
  95. srcs: [
  96. "fs_mgr_fstab.cpp",
  97. "fs_mgr_boot_config.cpp",
  98. "fs_mgr_slotselect.cpp",
  99. ],
  100. target: {
  101. darwin: {
  102. enabled: false,
  103. },
  104. },
  105. export_include_dirs: ["include_fstab"],
  106. header_libs: [
  107. "libbase_headers",
  108. "libgsi_headers",
  109. ],
  110. }
  111. cc_binary {
  112. name: "remount",
  113. defaults: ["fs_mgr_defaults"],
  114. static_libs: [
  115. "libavb_user",
  116. ],
  117. shared_libs: [
  118. "libbootloader_message",
  119. "libbase",
  120. "libcrypto",
  121. "libfec",
  122. "libfs_mgr",
  123. ],
  124. header_libs: [
  125. "libcutils_headers",
  126. ],
  127. srcs: [
  128. "fs_mgr_remount.cpp",
  129. ],
  130. cppflags: [
  131. "-DALLOW_ADBD_DISABLE_VERITY=0",
  132. ],
  133. product_variables: {
  134. debuggable: {
  135. cppflags: [
  136. "-UALLOW_ADBD_DISABLE_VERITY",
  137. "-DALLOW_ADBD_DISABLE_VERITY=1",
  138. ],
  139. },
  140. },
  141. }