Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2018 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
| 17 | cc_defaults { |
| 18 | name: "libmeminfo_defaults", |
| 19 | cflags: [ |
| 20 | "-Wall", |
| 21 | "-Werror", |
| 22 | ], |
| 23 | |
| 24 | shared_libs: [ |
| 25 | "libbase", |
| 26 | "liblog", |
| 27 | "libprocinfo", |
| 28 | ], |
Suren Baghdasaryan | 3d40e5f | 2019-11-17 14:24:39 -0800 | [diff] [blame] | 29 | static_libs: [ |
| 30 | "libdmabufinfo", |
| 31 | ], |
Colin Cross | 9a35a1b | 2019-07-18 16:25:15 -0700 | [diff] [blame] | 32 | target: { |
| 33 | darwin: { |
| 34 | enabled: false, |
| 35 | }, |
| 36 | |
| 37 | }, |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | cc_library { |
| 41 | name: "libmeminfo", |
Mathieu Chartier | c9ccdde | 2019-07-16 17:21:10 -0700 | [diff] [blame] | 42 | host_supported: true, |
Victor Khimenko | dc0343e | 2020-06-30 23:27:46 +0200 | [diff] [blame] | 43 | native_bridge_supported: true, |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 44 | defaults: ["libmeminfo_defaults"], |
Suren Baghdasaryan | 3d40e5f | 2019-11-17 14:24:39 -0800 | [diff] [blame] | 45 | export_include_dirs: [ |
| 46 | "include", |
| 47 | "libdmabufinfo/include", |
| 48 | ], |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 49 | export_shared_lib_headers: ["libbase"], |
| 50 | srcs: [ |
| 51 | "pageacct.cpp", |
| 52 | "procmeminfo.cpp", |
| 53 | "sysmeminfo.cpp", |
| 54 | ], |
Jiyong Park | 133b629 | 2020-04-29 17:43:14 +0900 | [diff] [blame] | 55 | |
| 56 | apex_available: [ |
| 57 | "//apex_available:platform", |
| 58 | "com.android.art.release", |
| 59 | "com.android.art.debug", |
| 60 | ], |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | cc_test { |
| 64 | name: "libmeminfo_test", |
Suren Baghdasaryan | 480ae20 | 2020-01-10 14:37:21 -0800 | [diff] [blame] | 65 | test_suites: ["device-tests"], |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 66 | defaults: ["libmeminfo_defaults"], |
Suren Baghdasaryan | 480ae20 | 2020-01-10 14:37:21 -0800 | [diff] [blame] | 67 | require_root: true, |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 68 | |
| 69 | static_libs: [ |
| 70 | "libmeminfo", |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 71 | "libbase", |
| 72 | "liblog", |
| 73 | ], |
| 74 | |
| 75 | srcs: [ |
| 76 | "libmeminfo_test.cpp" |
| 77 | ], |
Sandeep Patil | 9f4028d | 2018-11-09 19:18:29 -0800 | [diff] [blame] | 78 | |
| 79 | data: [ |
| 80 | "testdata1/*", |
| 81 | "testdata2/*" |
| 82 | ], |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 83 | } |
| 84 | |
| 85 | cc_benchmark { |
| 86 | name: "libmeminfo_benchmark", |
| 87 | srcs: [ |
| 88 | "libmeminfo_benchmark.cpp", |
| 89 | ], |
| 90 | static_libs : [ |
| 91 | "libbase", |
| 92 | "liblog", |
| 93 | "libmeminfo", |
| 94 | "libprocinfo", |
| 95 | ], |
Sandeep Patil | 9f4028d | 2018-11-09 19:18:29 -0800 | [diff] [blame] | 96 | |
| 97 | data: [ |
| 98 | "testdata1/*", |
| 99 | ], |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 100 | } |