blob: 15b0d89d87361da475097ef148c29a611751f199 [file] [log] [blame]
Josh Gao911d7292016-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 Hsieh122352d2017-10-02 15:20:07 -070017cc_defaults {
18 name: "libprocinfo_defaults",
Elliott Hughesdc699a22018-02-16 17:58:14 -080019 cflags: [
20 "-Wall",
21 "-Werror",
22 "-Wextra",
23 ],
Chih-Hung Hsieh122352d2017-10-02 15:20:07 -070024}
Josh Gao911d7292016-10-28 15:23:25 -070025
26cc_library {
27 name: "libprocinfo",
Chih-Hung Hsieh122352d2017-10-02 15:20:07 -070028 defaults: ["libprocinfo_defaults"],
Jayant Chowdhary4362e5b2017-05-17 14:15:06 -070029 vendor_available: true,
Jiyong Parka0e75042018-05-24 14:11:00 +090030 recovery_available: true,
Justin Yun6a7e8822017-07-24 15:19:45 +090031 vndk: {
32 enabled: true,
33 },
Josh Gao911d7292016-10-28 15:23:25 -070034 host_supported: true,
35 srcs: [
36 "process.cpp",
Christopher Ferris3bae40b2019-08-16 10:49:34 -070037 "process_map.cpp",
Josh Gao911d7292016-10-28 15:23:25 -070038 ],
Josh Gao911d7292016-10-28 15:23:25 -070039
40 local_include_dirs: ["include"],
41 export_include_dirs: ["include"],
42 shared_libs: ["libbase"],
43 target: {
44 darwin: {
45 enabled: false,
46 },
Dan Willemsene0cd1e02017-03-15 15:23:36 -070047 linux_bionic: {
48 enabled: true,
49 },
Josh Gao911d7292016-10-28 15:23:25 -070050 windows: {
51 enabled: false,
52 },
53 },
Jiyong Park16a932a2020-04-28 18:22:23 +090054
55 apex_available: [
56 "//apex_available:platform",
57 "com.android.art.debug",
58 "com.android.art.release",
59 ],
Josh Gao911d7292016-10-28 15:23:25 -070060}
61
62// Tests
63// ------------------------------------------------------------------------------
64cc_test {
65 name: "libprocinfo_test",
Chih-Hung Hsieh122352d2017-10-02 15:20:07 -070066 defaults: ["libprocinfo_defaults"],
Josh Gao911d7292016-10-28 15:23:25 -070067 host_supported: true,
Christopher Ferris3bae40b2019-08-16 10:49:34 -070068 isolated: true,
Josh Gao911d7292016-10-28 15:23:25 -070069 srcs: [
70 "process_test.cpp",
Yabin Cui3841acc2018-05-10 17:19:12 -070071 "process_map_test.cpp",
Josh Gao911d7292016-10-28 15:23:25 -070072 ],
73 target: {
74 darwin: {
75 enabled: false,
76 },
77 windows: {
78 enabled: false,
79 },
80 },
81
Elliott Hughesdc699a22018-02-16 17:58:14 -080082 shared_libs: [
83 "libbase",
84 "libprocinfo",
85 ],
Josh Gao911d7292016-10-28 15:23:25 -070086
87 compile_multilib: "both",
88 multilib: {
89 lib32: {
90 suffix: "32",
91 },
92 lib64: {
93 suffix: "64",
94 },
95 },
Elliott Hughes40fdf3f2018-04-27 16:12:06 -070096
Yabin Cui3841acc2018-05-10 17:19:12 -070097 data: [
98 "testdata/*",
99 ],
100
Elliott Hughes40fdf3f2018-04-27 16:12:06 -0700101 test_suites: ["device-tests"],
Josh Gao911d7292016-10-28 15:23:25 -0700102}
Yabin Cui3841acc2018-05-10 17:19:12 -0700103
104cc_benchmark {
105 name: "libprocinfo_benchmark",
106 defaults: ["libprocinfo_defaults"],
Yabin Cui3841acc2018-05-10 17:19:12 -0700107 srcs: [
108 "process_map_benchmark.cpp",
109 ],
Yabin Cui3841acc2018-05-10 17:19:12 -0700110 shared_libs: [
111 "libbacktrace",
112 "libbase",
113 "libprocinfo",
114 "libunwindstack",
115 ],
116 compile_multilib: "both",
117 multilib: {
118 lib32: {
119 suffix: "32",
120 },
121 lib64: {
122 suffix: "64",
123 },
124 },
125
126 data: [
127 "testdata/*",
128 ],
129}