blob: ce1ac6076075f0024d92ac5a177d6df6f91eb0b3 [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,
Victor Khimenko69a28ea2020-06-18 22:01:13 +020030 // TODO(b/153609531): remove when no longer needed.
31 native_bridge_supported: true,
Jiyong Parkafb04832018-05-24 14:11:00 +090032 recovery_available: true,
Justin Yunca63d942017-07-24 15:19:45 +090033 vndk: {
34 enabled: true,
35 },
Josh Gao788a35d2016-10-28 15:23:25 -070036 host_supported: true,
37 srcs: [
38 "process.cpp",
Christopher Ferris8090b2e2019-08-16 10:49:34 -070039 "process_map.cpp",
Josh Gao788a35d2016-10-28 15:23:25 -070040 ],
Josh Gao788a35d2016-10-28 15:23:25 -070041
42 local_include_dirs: ["include"],
43 export_include_dirs: ["include"],
44 shared_libs: ["libbase"],
45 target: {
46 darwin: {
47 enabled: false,
48 },
Dan Willemsen04b1ffb2017-03-15 15:23:36 -070049 linux_bionic: {
50 enabled: true,
51 },
Josh Gao788a35d2016-10-28 15:23:25 -070052 windows: {
53 enabled: false,
54 },
55 },
Jiyong Parkd790a842020-04-28 18:22:23 +090056
57 apex_available: [
58 "//apex_available:platform",
Martin Stjernholmfd1fa242020-10-19 20:45:34 +010059 "com.android.art",
Jiyong Parkd790a842020-04-28 18:22:23 +090060 "com.android.art.debug",
Jiyong Parkd790a842020-04-28 18:22:23 +090061 ],
Josh Gao788a35d2016-10-28 15:23:25 -070062}
63
64// Tests
65// ------------------------------------------------------------------------------
66cc_test {
67 name: "libprocinfo_test",
Chih-Hung Hsiehf6522a82017-10-02 15:20:07 -070068 defaults: ["libprocinfo_defaults"],
Josh Gao788a35d2016-10-28 15:23:25 -070069 host_supported: true,
Christopher Ferris8090b2e2019-08-16 10:49:34 -070070 isolated: true,
Josh Gao788a35d2016-10-28 15:23:25 -070071 srcs: [
72 "process_test.cpp",
Yabin Cui9581aea2018-05-10 17:19:12 -070073 "process_map_test.cpp",
Josh Gao788a35d2016-10-28 15:23:25 -070074 ],
75 target: {
76 darwin: {
77 enabled: false,
78 },
79 windows: {
80 enabled: false,
81 },
82 },
83
Elliott Hughesb40eb702018-02-16 17:58:14 -080084 shared_libs: [
85 "libbase",
86 "libprocinfo",
87 ],
Josh Gao788a35d2016-10-28 15:23:25 -070088
89 compile_multilib: "both",
90 multilib: {
91 lib32: {
92 suffix: "32",
93 },
94 lib64: {
95 suffix: "64",
96 },
97 },
Elliott Hughes4ee366c2018-04-27 16:12:06 -070098
Yabin Cui9581aea2018-05-10 17:19:12 -070099 data: [
100 "testdata/*",
101 ],
102
Elliott Hughes4ee366c2018-04-27 16:12:06 -0700103 test_suites: ["device-tests"],
Josh Gao788a35d2016-10-28 15:23:25 -0700104}
Yabin Cui9581aea2018-05-10 17:19:12 -0700105
106cc_benchmark {
107 name: "libprocinfo_benchmark",
108 defaults: ["libprocinfo_defaults"],
Yabin Cui9581aea2018-05-10 17:19:12 -0700109 srcs: [
110 "process_map_benchmark.cpp",
111 ],
Yabin Cui9581aea2018-05-10 17:19:12 -0700112 shared_libs: [
113 "libbacktrace",
114 "libbase",
115 "libprocinfo",
116 "libunwindstack",
117 ],
118 compile_multilib: "both",
119 multilib: {
120 lib32: {
121 suffix: "32",
122 },
123 lib64: {
124 suffix: "64",
125 },
126 },
127
128 data: [
129 "testdata/*",
130 ],
131}