blob: 0c9a2b8a8b64fbf6bcc84c9d1d92787f7304dc3a [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 },
54}
55
56// Tests
57// ------------------------------------------------------------------------------
58cc_test {
59 name: "libprocinfo_test",
Chih-Hung Hsieh122352d2017-10-02 15:20:07 -070060 defaults: ["libprocinfo_defaults"],
Josh Gao911d7292016-10-28 15:23:25 -070061 host_supported: true,
Christopher Ferris3bae40b2019-08-16 10:49:34 -070062 isolated: true,
Josh Gao911d7292016-10-28 15:23:25 -070063 srcs: [
64 "process_test.cpp",
Yabin Cui3841acc2018-05-10 17:19:12 -070065 "process_map_test.cpp",
Josh Gao911d7292016-10-28 15:23:25 -070066 ],
67 target: {
68 darwin: {
69 enabled: false,
70 },
71 windows: {
72 enabled: false,
73 },
74 },
75
Elliott Hughesdc699a22018-02-16 17:58:14 -080076 shared_libs: [
77 "libbase",
78 "libprocinfo",
79 ],
Josh Gao911d7292016-10-28 15:23:25 -070080
81 compile_multilib: "both",
82 multilib: {
83 lib32: {
84 suffix: "32",
85 },
86 lib64: {
87 suffix: "64",
88 },
89 },
Elliott Hughes40fdf3f2018-04-27 16:12:06 -070090
Yabin Cui3841acc2018-05-10 17:19:12 -070091 data: [
92 "testdata/*",
93 ],
94
Elliott Hughes40fdf3f2018-04-27 16:12:06 -070095 test_suites: ["device-tests"],
Josh Gao911d7292016-10-28 15:23:25 -070096}
Yabin Cui3841acc2018-05-10 17:19:12 -070097
98cc_benchmark {
99 name: "libprocinfo_benchmark",
100 defaults: ["libprocinfo_defaults"],
Yabin Cui3841acc2018-05-10 17:19:12 -0700101 srcs: [
102 "process_map_benchmark.cpp",
103 ],
Yabin Cui3841acc2018-05-10 17:19:12 -0700104 shared_libs: [
105 "libbacktrace",
106 "libbase",
107 "libprocinfo",
108 "libunwindstack",
109 ],
110 compile_multilib: "both",
111 multilib: {
112 lib32: {
113 suffix: "32",
114 },
115 lib64: {
116 suffix: "64",
117 },
118 },
119
120 data: [
121 "testdata/*",
122 ],
123}