blob: a6b4eaea4f289eb4d0816a937d9e9d6a9db040b7 [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,
Jiyong Parkafb04832018-05-24 14:11:00 +090037 recovery_available: true,
Yifan Hongbd752192020-10-27 16:48:11 -070038 vendor_ramdisk_available: true,
Justin Yunca63d942017-07-24 15:19:45 +090039 vndk: {
40 enabled: true,
41 },
Josh Gao788a35d2016-10-28 15:23:25 -070042 host_supported: true,
43 srcs: [
44 "process.cpp",
45 ],
Josh Gao788a35d2016-10-28 15:23:25 -070046
47 local_include_dirs: ["include"],
48 export_include_dirs: ["include"],
49 shared_libs: ["libbase"],
50 target: {
51 darwin: {
52 enabled: false,
53 },
Dan Willemsen04b1ffb2017-03-15 15:23:36 -070054 linux_bionic: {
55 enabled: true,
56 },
Josh Gao788a35d2016-10-28 15:23:25 -070057 windows: {
58 enabled: false,
59 },
60 },
Jiyong Parkd790a842020-04-28 18:22:23 +090061
62 apex_available: [
63 "//apex_available:platform",
Martin Stjernholm367b23d2020-10-19 20:45:34 +010064 "com.android.art",
Jiyong Parkd790a842020-04-28 18:22:23 +090065 "com.android.art.debug",
Jiyong Parkd790a842020-04-28 18:22:23 +090066 ],
Josh Gao788a35d2016-10-28 15:23:25 -070067}
68
69// Tests
70// ------------------------------------------------------------------------------
71cc_test {
72 name: "libprocinfo_test",
Chih-Hung Hsiehf6522a82017-10-02 15:20:07 -070073 defaults: ["libprocinfo_defaults"],
Josh Gao788a35d2016-10-28 15:23:25 -070074 host_supported: true,
Christopher Ferris8090b2e2019-08-16 10:49:34 -070075 isolated: true,
Josh Gao788a35d2016-10-28 15:23:25 -070076 srcs: [
77 "process_test.cpp",
Yabin Cui9581aea2018-05-10 17:19:12 -070078 "process_map_test.cpp",
Josh Gao788a35d2016-10-28 15:23:25 -070079 ],
80 target: {
81 darwin: {
82 enabled: false,
83 },
84 windows: {
85 enabled: false,
86 },
87 },
88
Elliott Hughesb40eb702018-02-16 17:58:14 -080089 shared_libs: [
90 "libbase",
91 "libprocinfo",
92 ],
Josh Gao788a35d2016-10-28 15:23:25 -070093
94 compile_multilib: "both",
95 multilib: {
96 lib32: {
97 suffix: "32",
98 },
99 lib64: {
100 suffix: "64",
101 },
102 },
Elliott Hughes4ee366c2018-04-27 16:12:06 -0700103
Yabin Cui9581aea2018-05-10 17:19:12 -0700104 data: [
105 "testdata/*",
106 ],
107
Elliott Hughes4ee366c2018-04-27 16:12:06 -0700108 test_suites: ["device-tests"],
Josh Gao788a35d2016-10-28 15:23:25 -0700109}
Yabin Cui9581aea2018-05-10 17:19:12 -0700110
111cc_benchmark {
112 name: "libprocinfo_benchmark",
113 defaults: ["libprocinfo_defaults"],
Yabin Cui9581aea2018-05-10 17:19:12 -0700114 srcs: [
115 "process_map_benchmark.cpp",
116 ],
Yabin Cui9581aea2018-05-10 17:19:12 -0700117 shared_libs: [
118 "libbacktrace",
119 "libbase",
120 "libprocinfo",
121 "libunwindstack",
122 ],
123 compile_multilib: "both",
124 multilib: {
125 lib32: {
126 suffix: "32",
127 },
128 lib64: {
129 suffix: "64",
130 },
131 },
132
133 data: [
134 "testdata/*",
135 ],
136}