Android.bp 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. cc_library_headers {
  2. name: "rs-headers",
  3. export_include_dirs: ["."],
  4. sdk_version: "9",
  5. }
  6. cc_defaults {
  7. name: "rs_defaults",
  8. cflags: [
  9. "-Werror",
  10. "-Wall",
  11. "-Wextra",
  12. "-Wno-unused-parameter",
  13. "-Wno-unused-variable",
  14. ],
  15. }
  16. cc_library_shared {
  17. name: "libRSDriver",
  18. vendor_available: true,
  19. vndk: {
  20. enabled: true,
  21. support_system_process: true,
  22. },
  23. defaults: ["rs_defaults"],
  24. srcs: [
  25. "driver/rsdAllocation.cpp",
  26. "driver/rsdBcc.cpp",
  27. "driver/rsdCore.cpp",
  28. "driver/rsdElement.cpp",
  29. "driver/rsdFrameBuffer.cpp",
  30. "driver/rsdFrameBufferObj.cpp",
  31. "driver/rsdGL.cpp",
  32. "driver/rsdMesh.cpp",
  33. "driver/rsdMeshObj.cpp",
  34. "driver/rsdProgram.cpp",
  35. "driver/rsdProgramRaster.cpp",
  36. "driver/rsdProgramStore.cpp",
  37. "driver/rsdRuntimeStubs.cpp",
  38. "driver/rsdSampler.cpp",
  39. "driver/rsdScriptGroup.cpp",
  40. "driver/rsdShader.cpp",
  41. "driver/rsdShaderCache.cpp",
  42. "driver/rsdType.cpp",
  43. "driver/rsdVertexArray.cpp",
  44. ],
  45. shared_libs: [
  46. "libRS_internal",
  47. "libRSCpuRef",
  48. "liblog",
  49. "libEGL",
  50. "libGLESv1_CM",
  51. "libGLESv2",
  52. "libnativewindow",
  53. "libbcinfo",
  54. ],
  55. static_libs: ["libarect"],
  56. header_libs: [
  57. "libcutils_headers",
  58. "libutils_headers",
  59. "libnativebase_headers",
  60. ],
  61. product_variables: {
  62. pdk: {
  63. enabled: false,
  64. },
  65. },
  66. // Bug: http://b/77445194 - Disable x86 asan where rsdRuntimeStubs.cpp has
  67. // undefined reference to half-conversion routines (__gnu_h2f_ieee,
  68. // __gnu_f2h_ieee).
  69. arch: {
  70. x86: {
  71. sanitize: {
  72. never: true,
  73. },
  74. },
  75. },
  76. }
  77. // Build rsg-generator ====================
  78. cc_binary_host {
  79. name: "rsg-generator",
  80. srcs: [
  81. "spec.l",
  82. "rsg_generator.c",
  83. ],
  84. cflags: [
  85. "-Wno-unused-function",
  86. ],
  87. stl: "none",
  88. sanitize: {
  89. never: true,
  90. },
  91. }
  92. // Generate custom headers
  93. gensrcs {
  94. name: "rs_generated_headers",
  95. tools: ["rsg-generator"],
  96. tool_files: [
  97. "rs.spec",
  98. "rsg.spec",
  99. ],
  100. cmd: "cat $(location rs.spec) $(location rsg.spec) | $(location rsg-generator) $(in) $(out)",
  101. output_extension: "h",
  102. srcs: [
  103. "rsgApiStructs.h_rsg",
  104. "rsgApiFuncDecl.h_rsg",
  105. ],
  106. export_include_dirs: ["."],
  107. }
  108. gensrcs {
  109. name: "rs_generated_sources",
  110. tools: ["rsg-generator"],
  111. tool_files: [
  112. "rs.spec",
  113. "rsg.spec",
  114. ],
  115. cmd: "cat $(location rs.spec) $(location rsg.spec) | $(location rsg-generator) $(in) $(out)",
  116. output_extension: "cpp",
  117. srcs: [
  118. "rsgApi.cpp_rsg",
  119. "rsgApiReplay.cpp_rsg",
  120. ],
  121. }
  122. cc_library_shared {
  123. name: "libRS_internal",
  124. vendor_available: true,
  125. vndk: {
  126. enabled: true,
  127. support_system_process: true,
  128. },
  129. defaults: ["rs_defaults"],
  130. srcs: [
  131. "rsApiAllocation.cpp",
  132. "rsApiContext.cpp",
  133. "rsApiDevice.cpp",
  134. "rsApiElement.cpp",
  135. "rsApiFileA3D.cpp",
  136. "rsApiMesh.cpp",
  137. "rsApiType.cpp",
  138. "rsAllocation.cpp",
  139. "rsAnimation.cpp",
  140. "rsComponent.cpp",
  141. "rsContext.cpp",
  142. "rsClosure.cpp",
  143. "rsCppUtils.cpp",
  144. "rsDevice.cpp",
  145. "rsDriverLoader.cpp",
  146. "rsElement.cpp",
  147. "rsFBOCache.cpp",
  148. "rsFifoSocket.cpp",
  149. "rsFileA3D.cpp",
  150. "rsFont.cpp",
  151. "rsGrallocConsumer.cpp",
  152. "rsObjectBase.cpp",
  153. "rsMatrix2x2.cpp",
  154. "rsMatrix3x3.cpp",
  155. "rsMatrix4x4.cpp",
  156. "rsMesh.cpp",
  157. "rsMutex.cpp",
  158. "rsProgram.cpp",
  159. "rsProgramFragment.cpp",
  160. "rsProgramStore.cpp",
  161. "rsProgramRaster.cpp",
  162. "rsProgramVertex.cpp",
  163. "rsSampler.cpp",
  164. "rsScript.cpp",
  165. "rsScriptC.cpp",
  166. "rsScriptC_Lib.cpp",
  167. "rsScriptC_LibGL.cpp",
  168. "rsScriptGroup.cpp",
  169. "rsScriptGroup2.cpp",
  170. "rsScriptIntrinsic.cpp",
  171. "rsSignal.cpp",
  172. "rsStream.cpp",
  173. "rsThreadIO.cpp",
  174. "rsType.cpp",
  175. ],
  176. generated_sources: ["rs_generated_sources"],
  177. generated_headers: ["rs_generated_headers"],
  178. shared_libs: [
  179. "liblog",
  180. "libutilscallstack",
  181. "libutils",
  182. "libEGL",
  183. "libGLESv1_CM",
  184. "libGLESv2",
  185. "libdl",
  186. "libnativewindow",
  187. "libft2",
  188. "libbcinfo",
  189. "libmediandk",
  190. ],
  191. static_libs: ["libarect"],
  192. // These runtime modules, including libcompiler_rt.so, are required for
  193. // RenderScript.
  194. required: [
  195. "libclcore.bc",
  196. "libclcore_debug.bc",
  197. "libclcore_debug_g.bc",
  198. "libclcore_g.bc",
  199. "libcompiler_rt",
  200. ],
  201. arch: {
  202. x86: {
  203. required: ["libclcore_x86.bc"],
  204. },
  205. x86_64: {
  206. required: ["libclcore_x86.bc"],
  207. },
  208. arm: {
  209. neon: {
  210. required: ["libclcore_neon.bc"],
  211. },
  212. },
  213. },
  214. product_variables: {
  215. override_rs_driver: {
  216. cflags: ["-DOVERRIDE_RS_DRIVER=%s"],
  217. },
  218. pdk: {
  219. enabled: false,
  220. },
  221. },
  222. }
  223. cc_library_shared {
  224. name: "libRS",
  225. defaults: ["rs_defaults"],
  226. srcs: [
  227. "rsApiStubs.cpp",
  228. "rsHidlAdaptation.cpp",
  229. "rsFallbackAdaptation.cpp",
  230. ],
  231. // Default CPU fallback
  232. required: [
  233. "libRS_internal",
  234. "libRSDriver",
  235. "libRSCacheDir",
  236. ],
  237. // Treble configuration
  238. shared_libs: [
  239. "libhidlbase",
  240. "libhidltransport",
  241. "libhwbinder",
  242. "libutilscallstack",
  243. "libutils",
  244. "[email protected]",
  245. "liblog",
  246. "libcutils",
  247. ],
  248. product_variables: {
  249. pdk: {
  250. enabled: false,
  251. },
  252. },
  253. static_libs: ["libRSDispatch"],
  254. version_script: "libRS.map",
  255. }
  256. llndk_library {
  257. name: "libRS",
  258. symbol_file: "libRS.map",
  259. }
  260. cc_library_shared {
  261. name: "libRSCacheDir",
  262. defaults: ["rs_defaults"],
  263. srcs: ["rsCacheDir.cpp"],
  264. shared_libs: [
  265. "libandroid_runtime",
  266. "liblog",
  267. ],
  268. product_variables: {
  269. pdk: {
  270. enabled: false,
  271. },
  272. },
  273. }
  274. build = [
  275. "support.bp",
  276. ]
  277. subdirs = [
  278. "cpp",
  279. "cpu_ref",
  280. "script_api",
  281. "support",
  282. ]