blob: 7306d44640c2c1f75878f4b7ba1a3ee782e60e21 [file] [log] [blame]
Sandeep Patila60a7762018-08-29 17:10:47 -07001//
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 Badourbd990472021-02-12 18:10:24 -080017package {
18 default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
Sandeep Patila60a7762018-08-29 17:10:47 -070021cc_defaults {
22 name: "libmeminfo_defaults",
23 cflags: [
24 "-Wall",
25 "-Werror",
26 ],
27
28 shared_libs: [
29 "libbase",
30 "liblog",
31 "libprocinfo",
32 ],
Suren Baghdasaryan3d40e5f2019-11-17 14:24:39 -080033 static_libs: [
34 "libdmabufinfo",
35 ],
Colin Cross9a35a1b2019-07-18 16:25:15 -070036 target: {
Suren Baghdasaryan5106ef72020-10-22 12:56:51 -070037 android: {
38 static_libs: [
39 "libbpf_android",
40 ],
41 },
42 apex: {
43 exclude_static_libs: [
44 "libbpf_android",
45 ],
46 },
Kevin Jeonc851b322021-03-30 06:33:12 +000047 vendor: {
48 exclude_static_libs: [
49 "libbpf_android",
50 ],
51 },
Colin Cross9a35a1b2019-07-18 16:25:15 -070052 darwin: {
53 enabled: false,
54 },
55
56 },
Sandeep Patila60a7762018-08-29 17:10:47 -070057}
58
59cc_library {
60 name: "libmeminfo",
Mathieu Chartierc9ccdde2019-07-16 17:21:10 -070061 host_supported: true,
Victor Khimenko8bee3d92020-06-30 23:27:46 +020062 native_bridge_supported: true,
Kevin Jeonc851b322021-03-30 06:33:12 +000063 vendor_available: true,
Sandeep Patila60a7762018-08-29 17:10:47 -070064 defaults: ["libmeminfo_defaults"],
Suren Baghdasaryan3d40e5f2019-11-17 14:24:39 -080065 export_include_dirs: [
66 "include",
67 "libdmabufinfo/include",
68 ],
Sandeep Patila60a7762018-08-29 17:10:47 -070069 export_shared_lib_headers: ["libbase"],
70 srcs: [
71 "pageacct.cpp",
72 "procmeminfo.cpp",
73 "sysmeminfo.cpp",
74 ],
Jiyong Parkd5482712020-04-29 17:43:14 +090075
76 apex_available: [
77 "//apex_available:platform",
Martin Stjernholm09f13c22020-10-12 15:11:16 +010078 "com.android.art",
Jiyong Parkd5482712020-04-29 17:43:14 +090079 "com.android.art.debug",
80 ],
Nicolas Geoffray1ab9c682021-03-03 21:52:15 +000081 min_sdk_version: "S",
Sandeep Patila60a7762018-08-29 17:10:47 -070082}
83
84cc_test {
85 name: "libmeminfo_test",
Suren Baghdasaryan480ae202020-01-10 14:37:21 -080086 test_suites: ["device-tests"],
Sandeep Patila60a7762018-08-29 17:10:47 -070087 defaults: ["libmeminfo_defaults"],
Suren Baghdasaryan480ae202020-01-10 14:37:21 -080088 require_root: true,
Sandeep Patila60a7762018-08-29 17:10:47 -070089
90 static_libs: [
Hridya Valsaraju7d1343d2021-02-09 21:48:24 -080091 "libc++fs",
Sandeep Patila60a7762018-08-29 17:10:47 -070092 "libmeminfo",
Sandeep Patila60a7762018-08-29 17:10:47 -070093 "libbase",
94 "liblog",
95 ],
96
Suren Baghdasaryancf0afe02021-02-02 09:26:38 -080097 shared_libs: ["libvintf"],
98
Sandeep Patila60a7762018-08-29 17:10:47 -070099 srcs: [
100 "libmeminfo_test.cpp"
101 ],
Sandeep Patil9f4028d2018-11-09 19:18:29 -0800102
103 data: [
104 "testdata1/*",
105 "testdata2/*"
106 ],
Sandeep Patila60a7762018-08-29 17:10:47 -0700107}
108
109cc_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 Patil9f4028d2018-11-09 19:18:29 -0800120
121 data: [
122 "testdata1/*",
123 ],
Sandeep Patila60a7762018-08-29 17:10:47 -0700124}