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 ramdisk_available: true, 38 recovery_available: true, 39 vendor_ramdisk_available: true, 40 vndk: { 41 enabled: true, 42 }, 43 host_supported: true, 44 srcs: [ 45 "process.cpp", 46 ], 47 48 local_include_dirs: ["include"], 49 export_include_dirs: ["include"], 50 shared_libs: ["libbase"], 51 target: { 52 darwin: { 53 enabled: false, 54 }, 55 linux_bionic: { 56 enabled: true, 57 }, 58 windows: { 59 enabled: false, 60 }, 61 }, 62 63 apex_available: [ 64 "//apex_available:platform", 65 "com.android.art", 66 "com.android.art.debug", 67 ], 68 min_sdk_version: "apex_inherit", 69} 70 71// Tests 72// ------------------------------------------------------------------------------ 73cc_test { 74 name: "libprocinfo_test", 75 defaults: ["libprocinfo_defaults"], 76 host_supported: true, 77 isolated: true, 78 srcs: [ 79 "process_test.cpp", 80 "process_map_test.cpp", 81 ], 82 target: { 83 darwin: { 84 enabled: false, 85 }, 86 windows: { 87 enabled: false, 88 }, 89 }, 90 91 shared_libs: [ 92 "libbase", 93 "libprocinfo", 94 ], 95 96 compile_multilib: "both", 97 multilib: { 98 lib32: { 99 suffix: "32", 100 }, 101 lib64: { 102 suffix: "64", 103 }, 104 }, 105 106 data: [ 107 "testdata/*", 108 ], 109 110 test_suites: ["device-tests"], 111} 112 113cc_benchmark { 114 name: "libprocinfo_benchmark", 115 defaults: ["libprocinfo_defaults"], 116 srcs: [ 117 "process_map_benchmark.cpp", 118 ], 119 shared_libs: [ 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