1//
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
17package {
18    default_team: "trendy_team_android_kernel",
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22cc_defaults {
23    name: "libprocinfo_defaults",
24    cflags: [
25        "-Wall",
26        "-Werror",
27        "-Wextra",
28    ],
29}
30
31cc_library {
32    name: "libprocinfo",
33    defaults: ["libprocinfo_defaults"],
34    vendor_available: true,
35    product_available: true,
36    // TODO(b/153609531): remove when no longer needed.
37    native_bridge_supported: true,
38    ramdisk_available: true,
39    recovery_available: true,
40    vendor_ramdisk_available: true,
41    host_supported: true,
42    srcs: [
43        "process.cpp",
44    ],
45
46    local_include_dirs: ["include"],
47    export_include_dirs: ["include"],
48    shared_libs: ["libbase"],
49    target: {
50        darwin: {
51            enabled: false,
52        },
53        linux_bionic: {
54            enabled: true,
55        },
56        windows: {
57            enabled: false,
58        },
59    },
60
61    apex_available: [
62        "//apex_available:platform",
63        "com.android.art",
64        "com.android.art.debug",
65        "com.android.runtime",
66    ],
67    min_sdk_version: "apex_inherit",
68}
69
70// Tests
71// ------------------------------------------------------------------------------
72cc_test {
73    name: "libprocinfo_test",
74    defaults: ["libprocinfo_defaults"],
75    host_supported: true,
76    isolated: true,
77    srcs: [
78        "process_test.cpp",
79        "process_map_test.cpp",
80    ],
81    target: {
82        darwin: {
83            enabled: false,
84        },
85        windows: {
86            enabled: false,
87        },
88    },
89
90    shared_libs: [
91        "libbase",
92        "libprocinfo",
93    ],
94
95    compile_multilib: "both",
96    multilib: {
97        lib32: {
98            suffix: "32",
99        },
100        lib64: {
101            suffix: "64",
102        },
103    },
104
105    data: [
106        "testdata/*",
107    ],
108
109    test_suites: ["device-tests"],
110}
111
112cc_benchmark {
113    name: "libprocinfo_benchmark",
114    defaults: ["libprocinfo_defaults"],
115    srcs: [
116        "process_map_benchmark.cpp",
117    ],
118    shared_libs: [
119        "libbase",
120        "libprocinfo",
121        "libunwindstack",
122    ],
123    compile_multilib: "both",
124    multilib: {
125        lib32: {
126            suffix: "32",
127        },
128        lib64: {
129            suffix: "64",
130        },
131    },
132
133    data: [
134        "testdata/*",
135    ],
136}
137