blob: 9a926ebc3d6bfcde08f145149c5f6e1f447fe325 [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
Chih-Hung Hsiehf6522a82017-10-02 15:20:07 -070017cc_defaults {
18 name: "libprocinfo_defaults",
Elliott Hughesb40eb702018-02-16 17:58:14 -080019 cflags: [
20 "-Wall",
21 "-Werror",
22 "-Wextra",
23 ],
Chih-Hung Hsiehf6522a82017-10-02 15:20:07 -070024}
Josh Gao788a35d2016-10-28 15:23:25 -070025
26cc_library {
27 name: "libprocinfo",
Chih-Hung Hsiehf6522a82017-10-02 15:20:07 -070028 defaults: ["libprocinfo_defaults"],
Jayant Chowdharye53a0252017-05-17 14:15:06 -070029 vendor_available: true,
Justin Yun0bd39212020-11-11 19:24:42 +090030 product_available: true,
Victor Khimenko69a28ea2020-06-18 22:01:13 +020031 // TODO(b/153609531): remove when no longer needed.
32 native_bridge_supported: true,
Jiyong Parkafb04832018-05-24 14:11:00 +090033 recovery_available: true,
Yifan Hongbd752192020-10-27 16:48:11 -070034 vendor_ramdisk_available: true,
Justin Yunca63d942017-07-24 15:19:45 +090035 vndk: {
36 enabled: true,
37 },
Josh Gao788a35d2016-10-28 15:23:25 -070038 host_supported: true,
39 srcs: [
40 "process.cpp",
Christopher Ferris8090b2e2019-08-16 10:49:34 -070041 "process_map.cpp",
Josh Gao788a35d2016-10-28 15:23:25 -070042 ],
Josh Gao788a35d2016-10-28 15:23:25 -070043
44 local_include_dirs: ["include"],
45 export_include_dirs: ["include"],
46 shared_libs: ["libbase"],
47 target: {
48 darwin: {
49 enabled: false,
50 },
Dan Willemsen04b1ffb2017-03-15 15:23:36 -070051 linux_bionic: {
52 enabled: true,
53 },
Josh Gao788a35d2016-10-28 15:23:25 -070054 windows: {
55 enabled: false,
56 },
57 },
Jiyong Parkd790a842020-04-28 18:22:23 +090058
59 apex_available: [
60 "//apex_available:platform",
Martin Stjernholm367b23d2020-10-19 20:45:34 +010061 "com.android.art",
Jiyong Parkd790a842020-04-28 18:22:23 +090062 "com.android.art.debug",
Jiyong Parkd790a842020-04-28 18:22:23 +090063 ],
Josh Gao788a35d2016-10-28 15:23:25 -070064}
65
66// Tests
67// ------------------------------------------------------------------------------
68cc_test {
69 name: "libprocinfo_test",
Chih-Hung Hsiehf6522a82017-10-02 15:20:07 -070070 defaults: ["libprocinfo_defaults"],
Josh Gao788a35d2016-10-28 15:23:25 -070071 host_supported: true,
Christopher Ferris8090b2e2019-08-16 10:49:34 -070072 isolated: true,
Josh Gao788a35d2016-10-28 15:23:25 -070073 srcs: [
74 "process_test.cpp",
Yabin Cui9581aea2018-05-10 17:19:12 -070075 "process_map_test.cpp",
Josh Gao788a35d2016-10-28 15:23:25 -070076 ],
77 target: {
78 darwin: {
79 enabled: false,
80 },
81 windows: {
82 enabled: false,
83 },
84 },
85
Elliott Hughesb40eb702018-02-16 17:58:14 -080086 shared_libs: [
87 "libbase",
88 "libprocinfo",
89 ],
Josh Gao788a35d2016-10-28 15:23:25 -070090
91 compile_multilib: "both",
92 multilib: {
93 lib32: {
94 suffix: "32",
95 },
96 lib64: {
97 suffix: "64",
98 },
99 },
Elliott Hughes4ee366c2018-04-27 16:12:06 -0700100
Yabin Cui9581aea2018-05-10 17:19:12 -0700101 data: [
102 "testdata/*",
103 ],
104
Elliott Hughes4ee366c2018-04-27 16:12:06 -0700105 test_suites: ["device-tests"],
Josh Gao788a35d2016-10-28 15:23:25 -0700106}
Yabin Cui9581aea2018-05-10 17:19:12 -0700107
108cc_benchmark {
109 name: "libprocinfo_benchmark",
110 defaults: ["libprocinfo_defaults"],
Yabin Cui9581aea2018-05-10 17:19:12 -0700111 srcs: [
112 "process_map_benchmark.cpp",
113 ],
Yabin Cui9581aea2018-05-10 17:19:12 -0700114 shared_libs: [
115 "libbacktrace",
116 "libbase",
117 "libprocinfo",
118 "libunwindstack",
119 ],
120 compile_multilib: "both",
121 multilib: {
122 lib32: {
123 suffix: "32",
124 },
125 lib64: {
126 suffix: "64",
127 },
128 },
129
130 data: [
131 "testdata/*",
132 ],
133}