Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 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 | |
Chih-Hung Hsieh | f6522a8 | 2017-10-02 15:20:07 -0700 | [diff] [blame] | 17 | cc_defaults { |
| 18 | name: "libprocinfo_defaults", |
Elliott Hughes | b40eb70 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 19 | cflags: [ |
| 20 | "-Wall", |
| 21 | "-Werror", |
| 22 | "-Wextra", |
| 23 | ], |
Chih-Hung Hsieh | f6522a8 | 2017-10-02 15:20:07 -0700 | [diff] [blame] | 24 | } |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 25 | |
| 26 | cc_library { |
| 27 | name: "libprocinfo", |
Chih-Hung Hsieh | f6522a8 | 2017-10-02 15:20:07 -0700 | [diff] [blame] | 28 | defaults: ["libprocinfo_defaults"], |
Jayant Chowdhary | e53a025 | 2017-05-17 14:15:06 -0700 | [diff] [blame] | 29 | vendor_available: true, |
Justin Yun | 0bd3921 | 2020-11-11 19:24:42 +0900 | [diff] [blame] | 30 | product_available: true, |
Victor Khimenko | 69a28ea | 2020-06-18 22:01:13 +0200 | [diff] [blame] | 31 | // TODO(b/153609531): remove when no longer needed. |
| 32 | native_bridge_supported: true, |
Jiyong Park | afb0483 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 33 | recovery_available: true, |
Yifan Hong | bd75219 | 2020-10-27 16:48:11 -0700 | [diff] [blame] | 34 | vendor_ramdisk_available: true, |
Justin Yun | ca63d94 | 2017-07-24 15:19:45 +0900 | [diff] [blame] | 35 | vndk: { |
| 36 | enabled: true, |
| 37 | }, |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 38 | host_supported: true, |
| 39 | srcs: [ |
| 40 | "process.cpp", |
| 41 | ], |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 42 | |
| 43 | local_include_dirs: ["include"], |
| 44 | export_include_dirs: ["include"], |
| 45 | shared_libs: ["libbase"], |
| 46 | target: { |
| 47 | darwin: { |
| 48 | enabled: false, |
| 49 | }, |
Dan Willemsen | 04b1ffb | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 50 | linux_bionic: { |
| 51 | enabled: true, |
| 52 | }, |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 53 | windows: { |
| 54 | enabled: false, |
| 55 | }, |
| 56 | }, |
Jiyong Park | d790a84 | 2020-04-28 18:22:23 +0900 | [diff] [blame] | 57 | |
| 58 | apex_available: [ |
| 59 | "//apex_available:platform", |
Martin Stjernholm | 367b23d | 2020-10-19 20:45:34 +0100 | [diff] [blame] | 60 | "com.android.art", |
Jiyong Park | d790a84 | 2020-04-28 18:22:23 +0900 | [diff] [blame] | 61 | "com.android.art.debug", |
Jiyong Park | d790a84 | 2020-04-28 18:22:23 +0900 | [diff] [blame] | 62 | ], |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | // Tests |
| 66 | // ------------------------------------------------------------------------------ |
| 67 | cc_test { |
| 68 | name: "libprocinfo_test", |
Chih-Hung Hsieh | f6522a8 | 2017-10-02 15:20:07 -0700 | [diff] [blame] | 69 | defaults: ["libprocinfo_defaults"], |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 70 | host_supported: true, |
Christopher Ferris | 8090b2e | 2019-08-16 10:49:34 -0700 | [diff] [blame] | 71 | isolated: true, |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 72 | srcs: [ |
| 73 | "process_test.cpp", |
Yabin Cui | 9581aea | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 74 | "process_map_test.cpp", |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 75 | ], |
| 76 | target: { |
| 77 | darwin: { |
| 78 | enabled: false, |
| 79 | }, |
| 80 | windows: { |
| 81 | enabled: false, |
| 82 | }, |
| 83 | }, |
| 84 | |
Elliott Hughes | b40eb70 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 85 | shared_libs: [ |
| 86 | "libbase", |
| 87 | "libprocinfo", |
| 88 | ], |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 89 | |
| 90 | compile_multilib: "both", |
| 91 | multilib: { |
| 92 | lib32: { |
| 93 | suffix: "32", |
| 94 | }, |
| 95 | lib64: { |
| 96 | suffix: "64", |
| 97 | }, |
| 98 | }, |
Elliott Hughes | 4ee366c | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 99 | |
Yabin Cui | 9581aea | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 100 | data: [ |
| 101 | "testdata/*", |
| 102 | ], |
| 103 | |
Elliott Hughes | 4ee366c | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 104 | test_suites: ["device-tests"], |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 105 | } |
Yabin Cui | 9581aea | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 106 | |
| 107 | cc_benchmark { |
| 108 | name: "libprocinfo_benchmark", |
| 109 | defaults: ["libprocinfo_defaults"], |
Yabin Cui | 9581aea | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 110 | srcs: [ |
| 111 | "process_map_benchmark.cpp", |
| 112 | ], |
Yabin Cui | 9581aea | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 113 | shared_libs: [ |
| 114 | "libbacktrace", |
| 115 | "libbase", |
| 116 | "libprocinfo", |
| 117 | "libunwindstack", |
| 118 | ], |
| 119 | compile_multilib: "both", |
| 120 | multilib: { |
| 121 | lib32: { |
| 122 | suffix: "32", |
| 123 | }, |
| 124 | lib64: { |
| 125 | suffix: "64", |
| 126 | }, |
| 127 | }, |
| 128 | |
| 129 | data: [ |
| 130 | "testdata/*", |
| 131 | ], |
| 132 | } |