Android.bp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Copyright 2017 The Android Open Source Project
  2. metricslogger_lib_src_files = [
  3. "metrics_logger.cpp",
  4. ]
  5. cc_defaults {
  6. name: "metricslogger_defaults",
  7. host_supported: true,
  8. export_include_dirs: ["include"],
  9. local_include_dirs: ["include"],
  10. shared_libs: [
  11. "libbase",
  12. "liblog",
  13. "libstatssocket",
  14. ],
  15. whole_static_libs: ["libgtest_prod"],
  16. cflags: [
  17. "-Wall",
  18. "-Wextra",
  19. "-Werror",
  20. ],
  21. }
  22. // metricslogger shared library
  23. // -----------------------------------------------------------------------------
  24. cc_library {
  25. name: "libmetricslogger",
  26. srcs: metricslogger_lib_src_files,
  27. defaults: ["metricslogger_defaults"],
  28. export_shared_lib_headers: ["libstatssocket"],
  29. }
  30. // metricslogger shared library, debug
  31. // -----------------------------------------------------------------------------
  32. cc_library_shared {
  33. name: "libmetricslogger_debug",
  34. srcs: metricslogger_lib_src_files,
  35. defaults: ["metricslogger_defaults"],
  36. target: {
  37. host: {
  38. cflags: ["-UNDEBUG"],
  39. },
  40. },
  41. }
  42. // Native tests
  43. // -----------------------------------------------------------------------------
  44. cc_test {
  45. name: "metricslogger_tests",
  46. isolated: true,
  47. defaults: ["metricslogger_defaults"],
  48. shared_libs: [
  49. "libbase",
  50. "libmetricslogger_debug",
  51. ],
  52. srcs: [
  53. "metrics_logger_test.cpp",
  54. ],
  55. }