Android.bp 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. cc_defaults {
  2. name: "surfaceflinger_defaults",
  3. cflags: [
  4. "-Wall",
  5. "-Werror",
  6. "-Wformat",
  7. "-Wthread-safety",
  8. "-Wunused",
  9. "-Wunreachable-code",
  10. ],
  11. }
  12. cc_defaults {
  13. name: "libsurfaceflinger_defaults",
  14. defaults: ["surfaceflinger_defaults"],
  15. cflags: [
  16. "-DLOG_TAG=\"SurfaceFlinger\"",
  17. "-DGL_GLEXT_PROTOTYPES",
  18. "-DEGL_EGLEXT_PROTOTYPES",
  19. ],
  20. shared_libs: [
  21. "[email protected]",
  22. "android.hardware.configstore-utils",
  23. "[email protected]",
  24. "[email protected]",
  25. "[email protected]",
  26. "[email protected]",
  27. "[email protected]",
  28. "[email protected]",
  29. "[email protected]",
  30. "[email protected]",
  31. "[email protected]",
  32. "[email protected]",
  33. "libbase",
  34. "libbinder",
  35. "libbufferhubqueue",
  36. "libcutils",
  37. "libdl",
  38. "libEGL",
  39. "libfmq",
  40. "libGLESv1_CM",
  41. "libGLESv2",
  42. "libgui",
  43. "libhardware",
  44. "libhidlbase",
  45. "libhidltransport",
  46. "libhwbinder",
  47. "liblayers_proto",
  48. "liblog",
  49. "libnativewindow",
  50. "libpdx_default_transport",
  51. "libprocessgroup",
  52. "libprotobuf-cpp-lite",
  53. "libsync",
  54. "libtimestats_proto",
  55. "libui",
  56. "libinput",
  57. "libutils",
  58. "libSurfaceFlingerProp",
  59. ],
  60. static_libs: [
  61. "libcompositionengine",
  62. "librenderengine",
  63. "libserviceutils",
  64. "libtrace_proto",
  65. "libvr_manager",
  66. "libvrflinger",
  67. ],
  68. header_libs: [
  69. "[email protected]",
  70. "[email protected]",
  71. "[email protected]",
  72. ],
  73. export_static_lib_headers: [
  74. "libcompositionengine",
  75. "librenderengine",
  76. "libserviceutils",
  77. ],
  78. export_shared_lib_headers: [
  79. "[email protected]",
  80. "[email protected]",
  81. "[email protected]",
  82. "[email protected]",
  83. "[email protected]",
  84. "[email protected]",
  85. "[email protected]",
  86. "libhidlbase",
  87. "libhidltransport",
  88. "libhwbinder",
  89. ],
  90. }
  91. cc_defaults {
  92. name: "libsurfaceflinger_production_defaults",
  93. defaults: ["libsurfaceflinger_defaults"],
  94. cflags: [
  95. "-fvisibility=hidden",
  96. "-fwhole-program-vtables", // requires ThinLTO
  97. ],
  98. lto: {
  99. thin: true,
  100. },
  101. }
  102. cc_library_headers {
  103. name: "libsurfaceflinger_headers",
  104. export_include_dirs: ["."],
  105. static_libs: ["libserviceutils"],
  106. export_static_lib_headers: ["libserviceutils"],
  107. }
  108. filegroup {
  109. name: "libsurfaceflinger_sources",
  110. srcs: [
  111. "BufferLayer.cpp",
  112. "BufferLayerConsumer.cpp",
  113. "BufferQueueLayer.cpp",
  114. "BufferStateLayer.cpp",
  115. "ClientCache.cpp",
  116. "Client.cpp",
  117. "ColorLayer.cpp",
  118. "ContainerLayer.cpp",
  119. "DisplayDevice.cpp",
  120. "DisplayHardware/ComposerHal.cpp",
  121. "DisplayHardware/DisplayIdentification.cpp",
  122. "DisplayHardware/FramebufferSurface.cpp",
  123. "DisplayHardware/HWC2.cpp",
  124. "DisplayHardware/HWComposer.cpp",
  125. "DisplayHardware/PowerAdvisor.cpp",
  126. "DisplayHardware/VirtualDisplaySurface.cpp",
  127. "Effects/Daltonizer.cpp",
  128. "EventLog/EventLog.cpp",
  129. "FrameTracker.cpp",
  130. "Layer.cpp",
  131. "LayerProtoHelper.cpp",
  132. "LayerRejecter.cpp",
  133. "LayerStats.cpp",
  134. "LayerVector.cpp",
  135. "MonitoredProducer.cpp",
  136. "NativeWindowSurface.cpp",
  137. "RefreshRateOverlay.cpp",
  138. "RegionSamplingThread.cpp",
  139. "RenderArea.cpp",
  140. "Scheduler/DispSync.cpp",
  141. "Scheduler/DispSyncSource.cpp",
  142. "Scheduler/EventControlThread.cpp",
  143. "Scheduler/EventThread.cpp",
  144. "Scheduler/IdleTimer.cpp",
  145. "Scheduler/LayerHistory.cpp",
  146. "Scheduler/LayerInfo.cpp",
  147. "Scheduler/MessageQueue.cpp",
  148. "Scheduler/PhaseOffsets.cpp",
  149. "Scheduler/Scheduler.cpp",
  150. "Scheduler/SchedulerUtils.cpp",
  151. "Scheduler/VSyncModulator.cpp",
  152. "StartPropertySetThread.cpp",
  153. "SurfaceFlinger.cpp",
  154. "SurfaceInterceptor.cpp",
  155. "SurfaceTracing.cpp",
  156. "TimeStats/TimeStats.cpp",
  157. "TransactionCompletedThread.cpp",
  158. ],
  159. }
  160. cc_library_shared {
  161. // Please use libsurfaceflinger_defaults to configure how the sources are
  162. // built, so the same settings can be used elsewhere.
  163. name: "libsurfaceflinger",
  164. defaults: ["libsurfaceflinger_production_defaults"],
  165. srcs: [
  166. ":libsurfaceflinger_sources",
  167. // Note: SurfaceFlingerFactory is not in the default sources so that it
  168. // can be easily replaced.
  169. "SurfaceFlingerFactory.cpp",
  170. ],
  171. logtags: ["EventLog/EventLogTags.logtags"],
  172. }
  173. cc_defaults {
  174. name: "libsurfaceflinger_binary",
  175. defaults: ["surfaceflinger_defaults"],
  176. cflags: [
  177. "-DLOG_TAG=\"SurfaceFlinger\"",
  178. ],
  179. whole_static_libs: [
  180. "libsigchain",
  181. ],
  182. shared_libs: [
  183. "[email protected]",
  184. "android.hardware.configstore-utils",
  185. "[email protected]",
  186. "[email protected]",
  187. "[email protected]",
  188. "libbinder",
  189. "libcutils",
  190. "libdisplayservicehidl",
  191. "libhidlbase",
  192. "libhidltransport",
  193. "libinput",
  194. "liblayers_proto",
  195. "liblog",
  196. "libprocessgroup",
  197. "libsync",
  198. "libtimestats_proto",
  199. "libutils",
  200. ],
  201. static_libs: [
  202. "libserviceutils",
  203. "libtrace_proto",
  204. ],
  205. ldflags: ["-Wl,--export-dynamic"],
  206. }
  207. filegroup {
  208. name: "surfaceflinger_binary_sources",
  209. srcs: ["main_surfaceflinger.cpp"],
  210. }
  211. cc_binary {
  212. name: "surfaceflinger",
  213. defaults: ["libsurfaceflinger_binary"],
  214. init_rc: ["surfaceflinger.rc"],
  215. srcs: [":surfaceflinger_binary_sources"],
  216. shared_libs: [
  217. "libsurfaceflinger",
  218. "libSurfaceFlingerProp",
  219. ],
  220. }
  221. subdirs = [
  222. "layerproto",
  223. "TimeStats/timestatsproto",
  224. "tests",
  225. ]
  226. cc_library_shared {
  227. name: "libSurfaceFlingerProp",
  228. srcs: [
  229. "SurfaceFlingerProperties.cpp",
  230. ],
  231. shared_libs: [
  232. "android.hardware.configstore-utils",
  233. "[email protected]",
  234. "[email protected]",
  235. "[email protected]",
  236. "libhidlbase",
  237. "libhidltransport",
  238. "libhwbinder",
  239. "libui",
  240. "libutils",
  241. "liblog",
  242. ],
  243. static_libs: [
  244. "SurfaceFlingerProperties",
  245. ],
  246. export_shared_lib_headers: [
  247. "[email protected]",
  248. "libhidlbase",
  249. "libhidltransport",
  250. "libhwbinder",
  251. ],
  252. export_static_lib_headers: [
  253. "SurfaceFlingerProperties",
  254. ],
  255. }