| James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 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 |  | 
| James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 10 | 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 Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 21 | ], | 
|  | 22 | } | 
|  | 23 |  | 
|  | 24 | // metricslogger shared library | 
|  | 25 | // ----------------------------------------------------------------------------- | 
|  | 26 | cc_library_shared { | 
|  | 27 | name: "libmetricslogger", | 
|  | 28 | srcs: metricslogger_lib_src_files, | 
|  | 29 | defaults: ["metricslogger_defaults"], | 
|  | 30 | } | 
|  | 31 |  | 
| Mathew Inwood | d0613ac | 2018-04-12 13:55:41 +0100 | [diff] [blame] | 32 | // static version of libmetricslogger, needed by a few art static binaries | 
|  | 33 | cc_library_static { | 
|  | 34 | name: "libmetricslogger_static", | 
|  | 35 | srcs: metricslogger_lib_src_files, | 
|  | 36 | defaults: ["metricslogger_defaults"], | 
|  | 37 | } | 
|  | 38 |  | 
| James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 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 | ], | 
| James Hawkins | 7607adf | 2017-02-13 13:41:44 -0800 | [diff] [blame] | 62 | static_libs: ["libBionicGtestMain"], | 
| James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 63 | srcs: [ | 
|  | 64 | "metrics_logger_test.cpp", | 
| James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 65 | ], | 
|  | 66 | } |