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 | |
Bob Badour | bd99047 | 2021-02-12 18:10:24 -0800 | [diff] [blame] | 17 | package { |
| 18 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 19 | } |
| 20 | |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 21 | cc_defaults { |
| 22 | name: "libmeminfo_defaults", |
| 23 | cflags: [ |
| 24 | "-Wall", |
| 25 | "-Werror", |
| 26 | ], |
| 27 | |
| 28 | shared_libs: [ |
| 29 | "libbase", |
| 30 | "liblog", |
| 31 | "libprocinfo", |
| 32 | ], |
Suren Baghdasaryan | 3d40e5f | 2019-11-17 14:24:39 -0800 | [diff] [blame] | 33 | static_libs: [ |
| 34 | "libdmabufinfo", |
| 35 | ], |
Colin Cross | 9a35a1b | 2019-07-18 16:25:15 -0700 | [diff] [blame] | 36 | target: { |
Suren Baghdasaryan | 5106ef7 | 2020-10-22 12:56:51 -0700 | [diff] [blame] | 37 | android: { |
| 38 | static_libs: [ |
| 39 | "libbpf_android", |
| 40 | ], |
| 41 | }, |
| 42 | apex: { |
| 43 | exclude_static_libs: [ |
| 44 | "libbpf_android", |
| 45 | ], |
| 46 | }, |
Kevin Jeon | c851b32 | 2021-03-30 06:33:12 +0000 | [diff] [blame] | 47 | vendor: { |
| 48 | exclude_static_libs: [ |
| 49 | "libbpf_android", |
| 50 | ], |
| 51 | }, |
Colin Cross | 9a35a1b | 2019-07-18 16:25:15 -0700 | [diff] [blame] | 52 | darwin: { |
| 53 | enabled: false, |
| 54 | }, |
| 55 | |
| 56 | }, |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | cc_library { |
| 60 | name: "libmeminfo", |
Mathieu Chartier | c9ccdde | 2019-07-16 17:21:10 -0700 | [diff] [blame] | 61 | host_supported: true, |
Victor Khimenko | 8bee3d9 | 2020-06-30 23:27:46 +0200 | [diff] [blame] | 62 | native_bridge_supported: true, |
Kevin Jeon | c851b32 | 2021-03-30 06:33:12 +0000 | [diff] [blame] | 63 | vendor_available: true, |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 64 | defaults: ["libmeminfo_defaults"], |
Suren Baghdasaryan | 3d40e5f | 2019-11-17 14:24:39 -0800 | [diff] [blame] | 65 | export_include_dirs: [ |
| 66 | "include", |
| 67 | "libdmabufinfo/include", |
| 68 | ], |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 69 | export_shared_lib_headers: ["libbase"], |
| 70 | srcs: [ |
| 71 | "pageacct.cpp", |
| 72 | "procmeminfo.cpp", |
| 73 | "sysmeminfo.cpp", |
| 74 | ], |
Jiyong Park | d548271 | 2020-04-29 17:43:14 +0900 | [diff] [blame] | 75 | |
| 76 | apex_available: [ |
| 77 | "//apex_available:platform", |
Martin Stjernholm | 09f13c2 | 2020-10-12 15:11:16 +0100 | [diff] [blame] | 78 | "com.android.art", |
Jiyong Park | d548271 | 2020-04-29 17:43:14 +0900 | [diff] [blame] | 79 | "com.android.art.debug", |
| 80 | ], |
Nicolas Geoffray | 1ab9c68 | 2021-03-03 21:52:15 +0000 | [diff] [blame] | 81 | min_sdk_version: "S", |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | cc_test { |
| 85 | name: "libmeminfo_test", |
Suren Baghdasaryan | 480ae20 | 2020-01-10 14:37:21 -0800 | [diff] [blame] | 86 | test_suites: ["device-tests"], |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 87 | defaults: ["libmeminfo_defaults"], |
Suren Baghdasaryan | 480ae20 | 2020-01-10 14:37:21 -0800 | [diff] [blame] | 88 | require_root: true, |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 89 | |
| 90 | static_libs: [ |
Hridya Valsaraju | 7d1343d | 2021-02-09 21:48:24 -0800 | [diff] [blame] | 91 | "libc++fs", |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 92 | "libmeminfo", |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 93 | "libbase", |
| 94 | "liblog", |
| 95 | ], |
| 96 | |
Suren Baghdasaryan | cf0afe0 | 2021-02-02 09:26:38 -0800 | [diff] [blame] | 97 | shared_libs: ["libvintf"], |
| 98 | |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 99 | srcs: [ |
| 100 | "libmeminfo_test.cpp" |
| 101 | ], |
Sandeep Patil | 9f4028d | 2018-11-09 19:18:29 -0800 | [diff] [blame] | 102 | |
| 103 | data: [ |
| 104 | "testdata1/*", |
| 105 | "testdata2/*" |
| 106 | ], |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 107 | } |
| 108 | |
| 109 | cc_benchmark { |
| 110 | name: "libmeminfo_benchmark", |
| 111 | srcs: [ |
| 112 | "libmeminfo_benchmark.cpp", |
| 113 | ], |
| 114 | static_libs : [ |
| 115 | "libbase", |
| 116 | "liblog", |
| 117 | "libmeminfo", |
| 118 | "libprocinfo", |
| 119 | ], |
Sandeep Patil | 9f4028d | 2018-11-09 19:18:29 -0800 | [diff] [blame] | 120 | |
| 121 | data: [ |
| 122 | "testdata1/*", |
| 123 | ], |
Sandeep Patil | a60a776 | 2018-08-29 17:10:47 -0700 | [diff] [blame] | 124 | } |