Android.bp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. filegroup {
  2. name: "gpuservice_sources",
  3. srcs: [
  4. "GpuService.cpp",
  5. "gpustats/GpuStats.cpp"
  6. ],
  7. }
  8. filegroup {
  9. name: "gpuservice_binary_sources",
  10. srcs: ["main_gpuservice.cpp"],
  11. }
  12. cc_defaults {
  13. name: "gpuservice_defaults",
  14. cflags: [
  15. "-DLOG_TAG=\"GpuService\"",
  16. "-Wall",
  17. "-Werror",
  18. "-Wformat",
  19. "-Wthread-safety",
  20. "-Wunused",
  21. "-Wunreachable-code",
  22. ],
  23. srcs: [
  24. ":gpuservice_sources",
  25. ],
  26. include_dirs: [
  27. "frameworks/native/vulkan/vkjson",
  28. "frameworks/native/vulkan/include",
  29. ],
  30. shared_libs: [
  31. "libbase",
  32. "libbinder",
  33. "libcutils",
  34. "libgraphicsenv",
  35. "liblog",
  36. "libutils",
  37. "libvulkan",
  38. ],
  39. static_libs: [
  40. "libserviceutils",
  41. "libvkjson",
  42. ],
  43. }
  44. cc_defaults {
  45. name: "gpuservice_production_defaults",
  46. defaults: ["gpuservice_defaults"],
  47. cflags: [
  48. "-fvisibility=hidden",
  49. "-fwhole-program-vtables", // requires ThinLTO
  50. ],
  51. lto: {
  52. thin: true,
  53. },
  54. }
  55. cc_defaults {
  56. name: "gpuservice_binary",
  57. defaults: ["gpuservice_defaults"],
  58. whole_static_libs: [
  59. "libsigchain",
  60. ],
  61. shared_libs: [
  62. "libbinder",
  63. "libcutils",
  64. "liblog",
  65. "libutils",
  66. ],
  67. ldflags: ["-Wl,--export-dynamic"],
  68. }
  69. cc_binary {
  70. name: "gpuservice",
  71. defaults: ["gpuservice_binary"],
  72. init_rc: ["gpuservice.rc"],
  73. srcs: [":gpuservice_binary_sources"],
  74. }