| 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", | 
|  | 37 | ], | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 38 |  | 
|  | 39 | local_include_dirs: ["include"], | 
|  | 40 | export_include_dirs: ["include"], | 
|  | 41 | shared_libs: ["libbase"], | 
|  | 42 | target: { | 
|  | 43 | darwin: { | 
|  | 44 | enabled: false, | 
|  | 45 | }, | 
| Dan Willemsen | e0cd1e0 | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 46 | linux_bionic: { | 
|  | 47 | enabled: true, | 
|  | 48 | }, | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 49 | windows: { | 
|  | 50 | enabled: false, | 
|  | 51 | }, | 
|  | 52 | }, | 
|  | 53 | } | 
|  | 54 |  | 
|  | 55 | // Tests | 
|  | 56 | // ------------------------------------------------------------------------------ | 
|  | 57 | cc_test { | 
|  | 58 | name: "libprocinfo_test", | 
| Chih-Hung Hsieh | 122352d | 2017-10-02 15:20:07 -0700 | [diff] [blame] | 59 | defaults: ["libprocinfo_defaults"], | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 60 | host_supported: true, | 
|  | 61 | srcs: [ | 
|  | 62 | "process_test.cpp", | 
| Yabin Cui | 3841acc | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 63 | "process_map_test.cpp", | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 64 | ], | 
|  | 65 | target: { | 
|  | 66 | darwin: { | 
|  | 67 | enabled: false, | 
|  | 68 | }, | 
|  | 69 | windows: { | 
|  | 70 | enabled: false, | 
|  | 71 | }, | 
|  | 72 | }, | 
|  | 73 |  | 
| Elliott Hughes | dc699a2 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 74 | shared_libs: [ | 
|  | 75 | "libbase", | 
|  | 76 | "libprocinfo", | 
|  | 77 | ], | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 78 |  | 
|  | 79 | compile_multilib: "both", | 
|  | 80 | multilib: { | 
|  | 81 | lib32: { | 
|  | 82 | suffix: "32", | 
|  | 83 | }, | 
|  | 84 | lib64: { | 
|  | 85 | suffix: "64", | 
|  | 86 | }, | 
|  | 87 | }, | 
| Elliott Hughes | 40fdf3f | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 88 |  | 
| Yabin Cui | 3841acc | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 89 | data: [ | 
|  | 90 | "testdata/*", | 
|  | 91 | ], | 
|  | 92 |  | 
| Elliott Hughes | 40fdf3f | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 93 | test_suites: ["device-tests"], | 
| Josh Gao | 911d729 | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 94 | } | 
| Yabin Cui | 3841acc | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 95 |  | 
|  | 96 | cc_benchmark { | 
|  | 97 | name: "libprocinfo_benchmark", | 
|  | 98 | defaults: ["libprocinfo_defaults"], | 
| Yabin Cui | 3841acc | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 99 | srcs: [ | 
|  | 100 | "process_map_benchmark.cpp", | 
|  | 101 | ], | 
| Yabin Cui | 3841acc | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 102 | shared_libs: [ | 
|  | 103 | "libbacktrace", | 
|  | 104 | "libbase", | 
|  | 105 | "libprocinfo", | 
|  | 106 | "libunwindstack", | 
|  | 107 | ], | 
|  | 108 | compile_multilib: "both", | 
|  | 109 | multilib: { | 
|  | 110 | lib32: { | 
|  | 111 | suffix: "32", | 
|  | 112 | }, | 
|  | 113 | lib64: { | 
|  | 114 | suffix: "64", | 
|  | 115 | }, | 
|  | 116 | }, | 
|  | 117 |  | 
|  | 118 | data: [ | 
|  | 119 | "testdata/*", | 
|  | 120 | ], | 
|  | 121 | } |