| Josh Gao | 911d729 | 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 | 122352d | 2017-10-02 15:20:07 -0700 | [diff] [blame] | 17 | cc_defaults { | 
|  | 18 | name: "libprocinfo_defaults", | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 19 | cflags: [ | 
|  | 20 | "-Wall", | 
|  | 21 | "-Werror", | 
|  | 22 | "-Wextra", | 
|  | 23 | ], | 
| Chih-Hung Hsieh | 122352d | 2017-10-02 15:20:07 -0700 | [diff] [blame] | 24 | } | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 25 |  | 
|  | 26 | cc_library { | 
|  | 27 | name: "libprocinfo", | 
| Chih-Hung Hsieh | 122352d | 2017-10-02 15:20:07 -0700 | [diff] [blame] | 28 | defaults: ["libprocinfo_defaults"], | 
| Jayant Chowdhary | 4362e5b | 2017-05-17 14:15:06 -0700 | [diff] [blame] | 29 | vendor_available: true, | 
| Jiyong Park | a0e7504 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 30 | recovery_available: true, | 
| Justin Yun | 6a7e882 | 2017-07-24 15:19:45 +0900 | [diff] [blame] | 31 | vndk: { | 
|  | 32 | enabled: true, | 
|  | 33 | }, | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 34 | host_supported: true, | 
|  | 35 | srcs: [ | 
|  | 36 | "process.cpp", | 
| Christopher Ferris | 3bae40b | 2019-08-16 10:49:34 -0700 | [diff] [blame] | 37 | "process_map.cpp", | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 38 | ], | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 39 |  | 
|  | 40 | local_include_dirs: ["include"], | 
|  | 41 | export_include_dirs: ["include"], | 
|  | 42 | shared_libs: ["libbase"], | 
|  | 43 | target: { | 
|  | 44 | darwin: { | 
|  | 45 | enabled: false, | 
|  | 46 | }, | 
| Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 47 | linux_bionic: { | 
|  | 48 | enabled: true, | 
|  | 49 | }, | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 50 | windows: { | 
|  | 51 | enabled: false, | 
|  | 52 | }, | 
|  | 53 | }, | 
|  | 54 | } | 
|  | 55 |  | 
|  | 56 | // Tests | 
|  | 57 | // ------------------------------------------------------------------------------ | 
|  | 58 | cc_test { | 
|  | 59 | name: "libprocinfo_test", | 
| Chih-Hung Hsieh | 122352d | 2017-10-02 15:20:07 -0700 | [diff] [blame] | 60 | defaults: ["libprocinfo_defaults"], | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 61 | host_supported: true, | 
| Christopher Ferris | 3bae40b | 2019-08-16 10:49:34 -0700 | [diff] [blame] | 62 | isolated: true, | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 63 | srcs: [ | 
|  | 64 | "process_test.cpp", | 
| Yabin Cui | 3841acc | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 65 | "process_map_test.cpp", | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 66 | ], | 
|  | 67 | target: { | 
|  | 68 | darwin: { | 
|  | 69 | enabled: false, | 
|  | 70 | }, | 
|  | 71 | windows: { | 
|  | 72 | enabled: false, | 
|  | 73 | }, | 
|  | 74 | }, | 
|  | 75 |  | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 76 | shared_libs: [ | 
|  | 77 | "libbase", | 
|  | 78 | "libprocinfo", | 
|  | 79 | ], | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 80 |  | 
|  | 81 | compile_multilib: "both", | 
|  | 82 | multilib: { | 
|  | 83 | lib32: { | 
|  | 84 | suffix: "32", | 
|  | 85 | }, | 
|  | 86 | lib64: { | 
|  | 87 | suffix: "64", | 
|  | 88 | }, | 
|  | 89 | }, | 
| Elliott Hughes | 40fdf3f | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 90 |  | 
| Yabin Cui | 3841acc | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 91 | data: [ | 
|  | 92 | "testdata/*", | 
|  | 93 | ], | 
|  | 94 |  | 
| Elliott Hughes | 40fdf3f | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 95 | test_suites: ["device-tests"], | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 96 | } | 
| Yabin Cui | 3841acc | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 97 |  | 
|  | 98 | cc_benchmark { | 
|  | 99 | name: "libprocinfo_benchmark", | 
|  | 100 | defaults: ["libprocinfo_defaults"], | 
| Yabin Cui | 3841acc | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 101 | srcs: [ | 
|  | 102 | "process_map_benchmark.cpp", | 
|  | 103 | ], | 
| Yabin Cui | 3841acc | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 104 | 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 | } |