blob: ca3a9bf9e8acca70d2c94facef26308174bde883 [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,
Yifan Hongbd752192020-10-27 16:48:11 -070033 vendor_ramdisk_available: true,
Justin Yunca63d942017-07-24 15:19:45 +090034 vndk: {
35 enabled: true,
36 },
Josh Gao788a35d2016-10-28 15:23:25 -070037 host_supported: true,
38 srcs: [
39 "process.cpp",
Christopher Ferris8090b2e2019-08-16 10:49:34 -070040 "process_map.cpp",
Josh Gao788a35d2016-10-28 15:23:25 -070041 ],
Josh Gao788a35d2016-10-28 15:23:25 -070042
43 local_include_dirs: ["include"],
44 export_include_dirs: ["include"],
45 shared_libs: ["libbase"],
46 target: {
47 darwin: {
48 enabled: false,
49 },
Dan Willemsen04b1ffb2017-03-15 15:23:36 -070050 linux_bionic: {
51 enabled: true,
52 },
Josh Gao788a35d2016-10-28 15:23:25 -070053 windows: {
54 enabled: false,
55 },
56 },
Jiyong Parkd790a842020-04-28 18:22:23 +090057
58 apex_available: [
59 "//apex_available:platform",
Martin Stjernholm367b23d2020-10-19 20:45:34 +010060 "com.android.art",
Jiyong Parkd790a842020-04-28 18:22:23 +090061 "com.android.art.debug",
Jiyong Parkd790a842020-04-28 18:22:23 +090062 ],
Josh Gao788a35d2016-10-28 15:23:25 -070063}
64
65// Tests
66// ------------------------------------------------------------------------------
67cc_test {
68 name: "libprocinfo_test",
Chih-Hung Hsiehf6522a82017-10-02 15:20:07 -070069 defaults: ["libprocinfo_defaults"],
Josh Gao788a35d2016-10-28 15:23:25 -070070 host_supported: true,
Christopher Ferris8090b2e2019-08-16 10:49:34 -070071 isolated: true,
Josh Gao788a35d2016-10-28 15:23:25 -070072 srcs: [
73 "process_test.cpp",
Yabin Cui9581aea2018-05-10 17:19:12 -070074 "process_map_test.cpp",
Josh Gao788a35d2016-10-28 15:23:25 -070075 ],
76 target: {
77 darwin: {
78 enabled: false,
79 },
80 windows: {
81 enabled: false,
82 },
83 },
84
Elliott Hughesb40eb702018-02-16 17:58:14 -080085 shared_libs: [
86 "libbase",
87 "libprocinfo",
88 ],
Josh Gao788a35d2016-10-28 15:23:25 -070089
90 compile_multilib: "both",
91 multilib: {
92 lib32: {
93 suffix: "32",
94 },
95 lib64: {
96 suffix: "64",
97 },
98 },
Elliott Hughes4ee366c2018-04-27 16:12:06 -070099
Yabin Cui9581aea2018-05-10 17:19:12 -0700100 data: [
101 "testdata/*",
102 ],
103
Elliott Hughes4ee366c2018-04-27 16:12:06 -0700104 test_suites: ["device-tests"],
Josh Gao788a35d2016-10-28 15:23:25 -0700105}
Yabin Cui9581aea2018-05-10 17:19:12 -0700106
107cc_benchmark {
108 name: "libprocinfo_benchmark",
109 defaults: ["libprocinfo_defaults"],
Yabin Cui9581aea2018-05-10 17:19:12 -0700110 srcs: [
111 "process_map_benchmark.cpp",
112 ],
Yabin Cui9581aea2018-05-10 17:19:12 -0700113 shared_libs: [
114 "libbacktrace",
115 "libbase",
116 "libprocinfo",
117 "libunwindstack",
118 ],
119 compile_multilib: "both",
120 multilib: {
121 lib32: {
122 suffix: "32",
123 },
124 lib64: {
125 suffix: "64",
126 },
127 },
128
129 data: [
130 "testdata/*",
131 ],
132}