blob: a693452e0f22a7bd6d417efeee84d110b29b2e44 [file] [log] [blame]
Josh Gao788a35d2016-10-28 15:23:25 -07001//
2// Copyright (C) 2015 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 Badour08029ee2021-02-03 17:30:56 -080017package {
18 default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
Chih-Hung Hsiehf6522a82017-10-02 15:20:07 -070021cc_defaults {
22 name: "libprocinfo_defaults",
Elliott Hughesb40eb702018-02-16 17:58:14 -080023 cflags: [
24 "-Wall",
25 "-Werror",
26 "-Wextra",
27 ],
Chih-Hung Hsiehf6522a82017-10-02 15:20:07 -070028}
Josh Gao788a35d2016-10-28 15:23:25 -070029
30cc_library {
31 name: "libprocinfo",
Chih-Hung Hsiehf6522a82017-10-02 15:20:07 -070032 defaults: ["libprocinfo_defaults"],
Jayant Chowdharye53a0252017-05-17 14:15:06 -070033 vendor_available: true,
Justin Yun0bd39212020-11-11 19:24:42 +090034 product_available: true,
Victor Khimenko69a28ea2020-06-18 22:01:13 +020035 // TODO(b/153609531): remove when no longer needed.
36 native_bridge_supported: true,
Inseob Kimd91662a2021-06-14 11:55:32 +090037 ramdisk_available: true,
Jiyong Parkafb04832018-05-24 14:11:00 +090038 recovery_available: true,
Yifan Hongbd752192020-10-27 16:48:11 -070039 vendor_ramdisk_available: true,
Justin Yunca63d942017-07-24 15:19:45 +090040 vndk: {
41 enabled: true,
42 },
Josh Gao788a35d2016-10-28 15:23:25 -070043 host_supported: true,
44 srcs: [
45 "process.cpp",
46 ],
Josh Gao788a35d2016-10-28 15:23:25 -070047
48 local_include_dirs: ["include"],
49 export_include_dirs: ["include"],
50 shared_libs: ["libbase"],
51 target: {
52 darwin: {
53 enabled: false,
54 },
Dan Willemsen04b1ffb2017-03-15 15:23:36 -070055 linux_bionic: {
56 enabled: true,
57 },
Josh Gao788a35d2016-10-28 15:23:25 -070058 windows: {
59 enabled: false,
60 },
61 },
Jiyong Parkd790a842020-04-28 18:22:23 +090062
63 apex_available: [
64 "//apex_available:platform",
Martin Stjernholm367b23d2020-10-19 20:45:34 +010065 "com.android.art",
Jiyong Parkd790a842020-04-28 18:22:23 +090066 "com.android.art.debug",
Jiyong Parkd790a842020-04-28 18:22:23 +090067 ],
Nicolas Geoffray30c60532021-03-03 21:53:55 +000068 min_sdk_version: "apex_inherit",
Josh Gao788a35d2016-10-28 15:23:25 -070069}
70
71// Tests
72// ------------------------------------------------------------------------------
73cc_test {
74 name: "libprocinfo_test",
Chih-Hung Hsiehf6522a82017-10-02 15:20:07 -070075 defaults: ["libprocinfo_defaults"],
Josh Gao788a35d2016-10-28 15:23:25 -070076 host_supported: true,
Christopher Ferris8090b2e2019-08-16 10:49:34 -070077 isolated: true,
Josh Gao788a35d2016-10-28 15:23:25 -070078 srcs: [
79 "process_test.cpp",
Yabin Cui9581aea2018-05-10 17:19:12 -070080 "process_map_test.cpp",
Josh Gao788a35d2016-10-28 15:23:25 -070081 ],
82 target: {
83 darwin: {
84 enabled: false,
85 },
86 windows: {
87 enabled: false,
88 },
89 },
90
Elliott Hughesb40eb702018-02-16 17:58:14 -080091 shared_libs: [
92 "libbase",
93 "libprocinfo",
94 ],
Josh Gao788a35d2016-10-28 15:23:25 -070095
96 compile_multilib: "both",
97 multilib: {
98 lib32: {
99 suffix: "32",
100 },
101 lib64: {
102 suffix: "64",
103 },
104 },
Elliott Hughes4ee366c2018-04-27 16:12:06 -0700105
Yabin Cui9581aea2018-05-10 17:19:12 -0700106 data: [
107 "testdata/*",
108 ],
109
Elliott Hughes4ee366c2018-04-27 16:12:06 -0700110 test_suites: ["device-tests"],
Josh Gao788a35d2016-10-28 15:23:25 -0700111}
Yabin Cui9581aea2018-05-10 17:19:12 -0700112
113cc_benchmark {
114 name: "libprocinfo_benchmark",
115 defaults: ["libprocinfo_defaults"],
Yabin Cui9581aea2018-05-10 17:19:12 -0700116 srcs: [
117 "process_map_benchmark.cpp",
118 ],
Yabin Cui9581aea2018-05-10 17:19:12 -0700119 shared_libs: [
Yabin Cui9581aea2018-05-10 17:19:12 -0700120 "libbase",
121 "libprocinfo",
122 "libunwindstack",
123 ],
124 compile_multilib: "both",
125 multilib: {
126 lib32: {
127 suffix: "32",
128 },
129 lib64: {
130 suffix: "64",
131 },
132 },
133
134 data: [
135 "testdata/*",
136 ],
137}