2017-01-31 20:42:24 +01:00
|
|
|
// Copyright 2017 The Android Open Source Project
|
|
|
|
|
|
|
|
metricslogger_lib_src_files = [
|
|
|
|
"metrics_logger.cpp",
|
|
|
|
]
|
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "metricslogger_defaults",
|
|
|
|
|
|
|
|
clang: true,
|
|
|
|
host_supported: true,
|
|
|
|
|
|
|
|
export_include_dirs: ["include"],
|
|
|
|
local_include_dirs: ["include"],
|
|
|
|
shared_libs: ["liblog"],
|
|
|
|
whole_static_libs: ["libgtest_prod"],
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Wextra",
|
|
|
|
"-Werror",
|
|
|
|
|
|
|
|
// 524291 corresponds to sysui_histogram, from
|
|
|
|
// frameworks/base/core/java/com/android/internal/logging/EventLogTags.logtags
|
2017-02-28 17:34:38 +01:00
|
|
|
"-DHISTOGRAM_LOG_TAG=524292",
|
2017-05-16 03:03:35 +02:00
|
|
|
"-DCOUNT_LOG_TAG=524290",
|
2017-01-31 20:42:24 +01:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
// metricslogger shared library
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
cc_library_shared {
|
|
|
|
name: "libmetricslogger",
|
2017-05-17 20:54:23 +02:00
|
|
|
vendor_available: true,
|
2017-01-31 20:42:24 +01:00
|
|
|
srcs: metricslogger_lib_src_files,
|
|
|
|
defaults: ["metricslogger_defaults"],
|
|
|
|
}
|
|
|
|
|
|
|
|
// metricslogger shared library, debug
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
cc_library_shared {
|
|
|
|
name: "libmetricslogger_debug",
|
|
|
|
srcs: metricslogger_lib_src_files,
|
|
|
|
defaults: ["metricslogger_defaults"],
|
|
|
|
|
|
|
|
target: {
|
|
|
|
host: {
|
|
|
|
cflags: ["-UNDEBUG"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
// Native tests
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
cc_test {
|
|
|
|
name: "metricslogger_tests",
|
|
|
|
defaults: ["metricslogger_defaults"],
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libmetricslogger_debug",
|
|
|
|
],
|
2017-02-13 22:41:44 +01:00
|
|
|
static_libs: ["libBionicGtestMain"],
|
2017-01-31 20:42:24 +01:00
|
|
|
srcs: [
|
|
|
|
"metrics_logger_test.cpp",
|
|
|
|
],
|
|
|
|
}
|