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, |
Jiyong Park | afb0483 | 2018-05-24 14:11:00 +0900 | [diff] [blame] | 30 | recovery_available: true, |
Justin Yun | ca63d94 | 2017-07-24 15:19:45 +0900 | [diff] [blame] | 31 | vndk: { |
| 32 | enabled: true, |
| 33 | }, |
Jooyung Han | bfc99d6 | 2019-01-18 18:10:14 +0900 | [diff] [blame^] | 34 | double_loadable: true, |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 35 | host_supported: true, |
| 36 | srcs: [ |
| 37 | "process.cpp", |
| 38 | ], |
Josh Gao | 788a35d | 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 | 04b1ffb | 2017-03-15 15:23:36 -0700 | [diff] [blame] | 47 | linux_bionic: { |
| 48 | enabled: true, |
| 49 | }, |
Josh Gao | 788a35d | 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 | f6522a8 | 2017-10-02 15:20:07 -0700 | [diff] [blame] | 60 | defaults: ["libprocinfo_defaults"], |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 61 | host_supported: true, |
| 62 | srcs: [ |
| 63 | "process_test.cpp", |
Yabin Cui | 9581aea | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 64 | "process_map_test.cpp", |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 65 | ], |
| 66 | target: { |
| 67 | darwin: { |
| 68 | enabled: false, |
| 69 | }, |
| 70 | windows: { |
| 71 | enabled: false, |
| 72 | }, |
| 73 | }, |
| 74 | |
Elliott Hughes | b40eb70 | 2018-02-16 17:58:14 -0800 | [diff] [blame] | 75 | shared_libs: [ |
| 76 | "libbase", |
| 77 | "libprocinfo", |
| 78 | ], |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 79 | |
| 80 | compile_multilib: "both", |
| 81 | multilib: { |
| 82 | lib32: { |
| 83 | suffix: "32", |
| 84 | }, |
| 85 | lib64: { |
| 86 | suffix: "64", |
| 87 | }, |
| 88 | }, |
Elliott Hughes | 4ee366c | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 89 | |
Yabin Cui | 9581aea | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 90 | data: [ |
| 91 | "testdata/*", |
| 92 | ], |
| 93 | |
Elliott Hughes | 4ee366c | 2018-04-27 16:12:06 -0700 | [diff] [blame] | 94 | test_suites: ["device-tests"], |
Josh Gao | 788a35d | 2016-10-28 15:23:25 -0700 | [diff] [blame] | 95 | } |
Yabin Cui | 9581aea | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 96 | |
| 97 | cc_benchmark { |
| 98 | name: "libprocinfo_benchmark", |
| 99 | defaults: ["libprocinfo_defaults"], |
Yabin Cui | 9581aea | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 100 | srcs: [ |
| 101 | "process_map_benchmark.cpp", |
| 102 | ], |
Yabin Cui | 9581aea | 2018-05-10 17:19:12 -0700 | [diff] [blame] | 103 | shared_libs: [ |
| 104 | "libbacktrace", |
| 105 | "libbase", |
| 106 | "libprocinfo", |
| 107 | "libunwindstack", |
| 108 | ], |
| 109 | compile_multilib: "both", |
| 110 | multilib: { |
| 111 | lib32: { |
| 112 | suffix: "32", |
| 113 | }, |
| 114 | lib64: { |
| 115 | suffix: "64", |
| 116 | }, |
| 117 | }, |
| 118 | |
| 119 | data: [ |
| 120 | "testdata/*", |
| 121 | ], |
| 122 | } |