1 // Copyright 2017 The Android Open Source Project 2 3 metricslogger_lib_src_files = [ 4 "metrics_logger.cpp", 5 ] 6 7 cc_defaults { 8 name: "metricslogger_defaults", 9 10 clang: true, 11 host_supported: true, 12 13 export_include_dirs: ["include"], 14 local_include_dirs: ["include"], 15 shared_libs: ["liblog"], 16 whole_static_libs: ["libgtest_prod"], 17 18 cflags: [ 19 "-Wall", 20 "-Wextra", 21 "-Werror", 22 23 // The following define maps the sysui_multi_action logtag ID as represented by: 24 // frameworks/base/core/java/com/android/internal/logging/EventLogTags.logtags 25 // 26 // TODO(jhawkins): Query this value at runtime. 27 "-DMULTI_ACTION_LOG_TAG=524292", 28 ], 29 } 30 31 // metricslogger shared library 32 // ----------------------------------------------------------------------------- 33 cc_library_shared { 34 name: "libmetricslogger", 35 srcs: metricslogger_lib_src_files, 36 defaults: ["metricslogger_defaults"], 37 } 38 39 // metricslogger shared library, debug 40 // ----------------------------------------------------------------------------- 41 cc_library_shared { 42 name: "libmetricslogger_debug", 43 srcs: metricslogger_lib_src_files, 44 defaults: ["metricslogger_defaults"], 45 46 target: { 47 host: { 48 cflags: ["-UNDEBUG"], 49 }, 50 }, 51 } 52 53 // Native tests 54 // ----------------------------------------------------------------------------- 55 cc_test { 56 name: "metricslogger_tests", 57 defaults: ["metricslogger_defaults"], 58 shared_libs: [ 59 "libbase", 60 "libmetricslogger_debug", 61 ], 62 static_libs: ["libBionicGtestMain"], 63 srcs: [ 64 "metrics_logger_test.cpp", 65 ], 66 } 67