blob: e6e17ce875d2f0e02a0722a191089b3e382c36c7 [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
James Hawkins9aec9262017-01-31 11:42:24 -080010 host_supported: true,
11
12 export_include_dirs: ["include"],
13 local_include_dirs: ["include"],
14 shared_libs: ["liblog"],
15 whole_static_libs: ["libgtest_prod"],
16
17 cflags: [
18 "-Wall",
19 "-Wextra",
20 "-Werror",
James Hawkins9aec9262017-01-31 11:42:24 -080021 ],
22}
23
24// metricslogger shared library
25// -----------------------------------------------------------------------------
26cc_library_shared {
27 name: "libmetricslogger",
28 srcs: metricslogger_lib_src_files,
29 defaults: ["metricslogger_defaults"],
30}
31
Mathew Inwood07787e62018-04-12 13:55:41 +010032// static version of libmetricslogger, needed by a few art static binaries
33cc_library_static {
34 name: "libmetricslogger_static",
35 srcs: metricslogger_lib_src_files,
36 defaults: ["metricslogger_defaults"],
37}
38
James Hawkins9aec9262017-01-31 11:42:24 -080039// 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}