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"], |
Howard Ro | 34bc567 | 2018-10-15 21:42:34 -0700 | [diff] [blame] | 14 | shared_libs: [ |
| 15 | "libbase", |
| 16 | "liblog", |
| 17 | "libstatssocket", |
| 18 | ], |
James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 19 | whole_static_libs: ["libgtest_prod"], |
| 20 | |
| 21 | cflags: [ |
| 22 | "-Wall", |
| 23 | "-Wextra", |
| 24 | "-Werror", |
James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 25 | ], |
| 26 | } |
| 27 | |
| 28 | // metricslogger shared library |
| 29 | // ----------------------------------------------------------------------------- |
Howard Ro | 34bc567 | 2018-10-15 21:42:34 -0700 | [diff] [blame] | 30 | cc_library { |
James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 31 | name: "libmetricslogger", |
| 32 | srcs: metricslogger_lib_src_files, |
| 33 | defaults: ["metricslogger_defaults"], |
Howard Ro | 34bc567 | 2018-10-15 21:42:34 -0700 | [diff] [blame] | 34 | export_shared_lib_headers: ["libstatssocket"], |
James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | // metricslogger shared library, debug |
| 38 | // ----------------------------------------------------------------------------- |
| 39 | cc_library_shared { |
| 40 | name: "libmetricslogger_debug", |
| 41 | srcs: metricslogger_lib_src_files, |
| 42 | defaults: ["metricslogger_defaults"], |
| 43 | |
| 44 | target: { |
| 45 | host: { |
| 46 | cflags: ["-UNDEBUG"], |
| 47 | }, |
| 48 | }, |
| 49 | } |
| 50 | |
| 51 | // Native tests |
| 52 | // ----------------------------------------------------------------------------- |
| 53 | cc_test { |
| 54 | name: "metricslogger_tests", |
Christopher Ferris | 805ea83 | 2018-08-22 12:40:32 -0700 | [diff] [blame] | 55 | isolated: true, |
James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 56 | defaults: ["metricslogger_defaults"], |
| 57 | shared_libs: [ |
| 58 | "libbase", |
| 59 | "libmetricslogger_debug", |
| 60 | ], |
| 61 | srcs: [ |
| 62 | "metrics_logger_test.cpp", |
James Hawkins | 9aec926 | 2017-01-31 11:42:24 -0800 | [diff] [blame] | 63 | ], |
| 64 | } |