summaryrefslogtreecommitdiffstats
path: root/libmetricslogger/Android.bp
blob: e6e17ce875d2f0e02a0722a191089b3e382c36c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright 2017 The Android Open Source Project

metricslogger_lib_src_files = [
    "metrics_logger.cpp",
]

cc_defaults {
    name: "metricslogger_defaults",

    host_supported: true,

    export_include_dirs: ["include"],
    local_include_dirs: ["include"],
    shared_libs: ["liblog"],
    whole_static_libs: ["libgtest_prod"],

    cflags: [
        "-Wall",
        "-Wextra",
        "-Werror",
    ],
}

// metricslogger shared library
// -----------------------------------------------------------------------------
cc_library_shared {
    name: "libmetricslogger",
    srcs: metricslogger_lib_src_files,
    defaults: ["metricslogger_defaults"],
}

// static version of libmetricslogger, needed by a few art static binaries
cc_library_static {
    name: "libmetricslogger_static",
    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",
    ],
    static_libs: ["libBionicGtestMain"],
    srcs: [
        "metrics_logger_test.cpp",
    ],
}