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_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_defaults { 22 name: "libprocinfo_defaults", 23 cflags: [ 24 "-Wall", 25 "-Werror", 26 "-Wextra", 27 ], 28} 29 30cc_library { 31 name: "libprocinfo", 32 defaults: ["libprocinfo_defaults"], 33 vendor_available: true, 34 product_available: true, 35 // TODO(b/153609531): remove when no longer needed. 36 native_bridge_supported: true, 37 recovery_available: true, 38 vendor_ramdisk_available: true, 39 vndk: { 40 enabled: true, 41 }, 42 host_supported: true, 43 srcs: [ 44 "process.cpp", 45 ], 46 47 local_include_dirs: ["include"], 48 export_include_dirs: ["include"], 49 shared_libs: ["libbase"], 50 target: { 51 darwin: { 52 enabled: false, 53 }, 54 linux_bionic: { 55 enabled: true, 56 }, 57 windows: { 58 enabled: false, 59 }, 60 }, 61 62 apex_available: [ 63 "//apex_available:platform", 64 "com.android.art", 65 "com.android.art.debug", 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 "libbacktrace", 120 "libbase", 121 "libprocinfo", 122 "libunwindstack", 123 ], 124 compile_multilib: "both", 125 multilib: { 126 lib32: { 127 suffix: "32", 128 }, 129 lib64: { 130 suffix: "64", 131 }, 132 }, 133 134 data: [ 135 "testdata/*", 136 ], 137} 138