Android.bp 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. // Build the ETC1 library
  2. cc_library {
  3. name: "libETC1",
  4. srcs: ["ETC1/etc1.cpp"],
  5. host_supported: true,
  6. cflags: ["-Wall", "-Werror"],
  7. target: {
  8. android: {
  9. static: {
  10. enabled: false,
  11. },
  12. },
  13. host: {
  14. shared: {
  15. enabled: false,
  16. },
  17. },
  18. windows: {
  19. enabled: true,
  20. },
  21. },
  22. }
  23. // The headers modules are in frameworks/native/opengl/Android.bp.
  24. ndk_library {
  25. name: "libEGL",
  26. symbol_file: "libEGL.map.txt",
  27. first_version: "9",
  28. unversioned_until: "current",
  29. }
  30. ndk_library {
  31. name: "libGLESv1_CM",
  32. symbol_file: "libGLESv1_CM.map.txt",
  33. first_version: "9",
  34. unversioned_until: "current",
  35. }
  36. ndk_library {
  37. name: "libGLESv2",
  38. symbol_file: "libGLESv2.map.txt",
  39. first_version: "9",
  40. unversioned_until: "current",
  41. }
  42. ndk_library {
  43. name: "libGLESv3",
  44. symbol_file: "libGLESv3.map.txt",
  45. first_version: "18",
  46. unversioned_until: "current",
  47. }
  48. cc_defaults {
  49. name: "gl_libs_defaults",
  50. cflags: [
  51. "-DGL_GLEXT_PROTOTYPES",
  52. "-DEGL_EGLEXT_PROTOTYPES",
  53. "-fvisibility=hidden",
  54. "-Wall",
  55. "-Werror",
  56. "-Wno-unused-variable",
  57. ],
  58. shared_libs: [
  59. // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
  60. // In particular, DO NOT add libutils or anything "above" libcutils
  61. "libcutils",
  62. "liblog",
  63. "libdl",
  64. ],
  65. static_libs: [
  66. "libarect",
  67. ],
  68. header_libs: [
  69. "gl_headers",
  70. "libsystem_headers",
  71. "libhardware_headers",
  72. "libnativebase_headers",
  73. ],
  74. export_header_lib_headers: ["gl_headers"],
  75. // we need to access the private Bionic header <bionic_tls.h>
  76. include_dirs: ["bionic/libc/private"],
  77. }
  78. //##############################################################################
  79. // Build META EGL library
  80. //
  81. cc_defaults {
  82. name: "egl_libs_defaults",
  83. defaults: ["gl_libs_defaults"],
  84. cflags: [
  85. "-DLOG_TAG=\"libEGL\"",
  86. "-Wall",
  87. "-Werror",
  88. "-Wno-error=deprecated-register",
  89. "-Wno-error=unknown-attributes",
  90. "-Wno-unused-variable",
  91. ],
  92. shared_libs: [
  93. // ***** DO NOT ADD NEW DEPENDENCIES HERE *****
  94. // In particular, DO NOT add libutils nor anything "above" libui
  95. "libgraphicsenv",
  96. "libnativewindow",
  97. "libbacktrace",
  98. ],
  99. target: {
  100. vendor: {
  101. exclude_shared_libs: ["libgraphicsenv"],
  102. },
  103. },
  104. }
  105. cc_library_static {
  106. name: "libEGL_getProcAddress",
  107. defaults: ["egl_libs_defaults"],
  108. srcs: ["EGL/getProcAddress.cpp"],
  109. arch: {
  110. arm: {
  111. instruction_set: "arm",
  112. },
  113. },
  114. }
  115. cc_library_static {
  116. name: "libEGL_blobCache",
  117. defaults: ["egl_libs_defaults"],
  118. srcs: [
  119. "EGL/BlobCache.cpp",
  120. "EGL/FileBlobCache.cpp",
  121. ],
  122. export_include_dirs: ["EGL"],
  123. }
  124. cc_library_shared {
  125. name: "libEGL",
  126. defaults: ["egl_libs_defaults"],
  127. srcs: [
  128. "EGL/egl_tls.cpp",
  129. "EGL/egl_cache.cpp",
  130. "EGL/egl_display.cpp",
  131. "EGL/egl_object.cpp",
  132. "EGL/egl_layers.cpp",
  133. "EGL/egl.cpp",
  134. "EGL/eglApi.cpp",
  135. "EGL/egl_platform_entries.cpp",
  136. "EGL/Loader.cpp",
  137. "EGL/egl_angle_platform.cpp",
  138. ],
  139. shared_libs: [
  140. "libvndksupport",
  141. "[email protected]",
  142. "android.hardware.configstore-utils",
  143. "libbase",
  144. "libhidlbase",
  145. "libhidltransport",
  146. "libnativebridge_lazy",
  147. "libnativeloader_lazy",
  148. "libutils",
  149. ],
  150. static_libs: [
  151. "libEGL_getProcAddress",
  152. "libEGL_blobCache",
  153. ],
  154. ldflags: ["-Wl,--exclude-libs=ALL"],
  155. export_include_dirs: ["EGL/include"],
  156. }
  157. cc_test {
  158. name: "libEGL_test",
  159. defaults: ["egl_libs_defaults"],
  160. srcs: [
  161. "EGL/BlobCache.cpp",
  162. "EGL/BlobCache_test.cpp",
  163. ],
  164. }
  165. cc_defaults {
  166. name: "gles_libs_defaults",
  167. defaults: ["gl_libs_defaults"],
  168. arch: {
  169. arm: {
  170. instruction_set: "arm",
  171. // TODO: This is to work around b/20093774. Remove after root cause is fixed
  172. ldflags: ["-Wl,--hash-style,both"],
  173. },
  174. },
  175. shared_libs: ["libEGL"],
  176. }
  177. //##############################################################################
  178. // Build the wrapper OpenGL ES 1.x library
  179. //
  180. cc_library_shared {
  181. name: "libGLESv1_CM",
  182. defaults: ["gles_libs_defaults"],
  183. srcs: ["GLES_CM/gl.cpp"],
  184. cflags: ["-DLOG_TAG=\"libGLESv1\""],
  185. version_script: "libGLESv1_CM.map.txt",
  186. }
  187. //##############################################################################
  188. // Build the wrapper OpenGL ES 2.x library
  189. //
  190. cc_library_shared {
  191. name: "libGLESv2",
  192. defaults: ["gles_libs_defaults"],
  193. srcs: ["GLES2/gl2.cpp"],
  194. cflags: ["-DLOG_TAG=\"libGLESv2\""],
  195. // Bug: http://b/133874658 Disable native_coverage as we investigate a
  196. // crash in surfaceflinger on coverage-enabled cuttlefish builds.
  197. native_coverage: false,
  198. }
  199. //##############################################################################
  200. // Build the wrapper OpenGL ES 3.x library (this is just different name for v2)
  201. //
  202. cc_library_shared {
  203. name: "libGLESv3",
  204. defaults: ["gles_libs_defaults"],
  205. srcs: ["GLES2/gl2.cpp"],
  206. cflags: ["-DLOG_TAG=\"libGLESv3\""],
  207. }