blob: 38859d18efa9996ba0b46318eefbb84a32f2f908 [file] [log] [blame]
James Hawkins9aec9262017-01-31 11:42:24 -08001// Copyright 2017 The Android Open Source Project
2
3metricslogger_lib_src_files = [
4 "metrics_logger.cpp",
5]
6
7cc_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 // 524291 corresponds to sysui_histogram, from
24 // frameworks/base/core/java/com/android/internal/logging/EventLogTags.logtags
Chris Wren936fbbd2017-02-28 11:34:38 -050025 "-DHISTOGRAM_LOG_TAG=524292",
Ruchi Kandoib63072e2017-05-15 18:03:35 -070026 "-DCOUNT_LOG_TAG=524290",
James Hawkins9aec9262017-01-31 11:42:24 -080027 ],
28}
29
30// metricslogger shared library
31// -----------------------------------------------------------------------------
32cc_library_shared {
33 name: "libmetricslogger",
Jayant Chowdhary7f96d492017-05-17 11:54:23 -070034 vendor_available: true,
James Hawkins9aec9262017-01-31 11:42:24 -080035 srcs: metricslogger_lib_src_files,
36 defaults: ["metricslogger_defaults"],
37}
38
39// metricslogger shared library, debug
40// -----------------------------------------------------------------------------
41cc_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// -----------------------------------------------------------------------------
55cc_test {
56 name: "metricslogger_tests",
57 defaults: ["metricslogger_defaults"],
58 shared_libs: [
59 "libbase",
60 "libmetricslogger_debug",
61 ],
James Hawkins7607adf2017-02-13 13:41:44 -080062 static_libs: ["libBionicGtestMain"],
James Hawkins9aec9262017-01-31 11:42:24 -080063 srcs: [
64 "metrics_logger_test.cpp",
James Hawkins9aec9262017-01-31 11:42:24 -080065 ],
66}