Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2014 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 | |
| 17 | // Build variants {target,host} x {debug,ndebug} x {32,64} |
| 18 | |
| 19 | cc_defaults { |
| 20 | name: "imgdiag-defaults", |
| 21 | host_supported: true, |
| 22 | srcs: ["imgdiag.cc"], |
| 23 | defaults: ["art_defaults"], |
| 24 | |
| 25 | // Note that this tool needs to be built for both 32-bit and 64-bit since it requires |
| 26 | // that the image it's analyzing be the same ISA as the runtime ISA. |
| 27 | compile_multilib: "both", |
| 28 | |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 29 | shared_libs: [ |
| 30 | "libbacktrace", |
| 31 | "libbase", |
| 32 | ], |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 33 | target: { |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 34 | host: { |
| 35 | shared_libs: ["libziparchive"], |
| 36 | }, |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 37 | }, |
Andreas Gampe | 3157fc2 | 2017-08-23 09:43:46 -0700 | [diff] [blame] | 38 | header_libs: [ |
| 39 | "art_cmdlineparser_headers", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 40 | ], |
| 41 | multilib: { |
| 42 | lib32: { |
| 43 | suffix: "32", |
| 44 | }, |
| 45 | lib64: { |
| 46 | suffix: "64", |
| 47 | }, |
| 48 | }, |
| 49 | symlink_preferred_arch: true, |
| 50 | } |
| 51 | |
| 52 | art_cc_binary { |
| 53 | name: "imgdiag", |
| 54 | defaults: ["imgdiag-defaults"], |
| 55 | shared_libs: [ |
| 56 | "libart", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 57 | "libartbase", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 58 | "libart-compiler", |
| 59 | ], |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame^] | 60 | apex_available: [ |
| 61 | "com.android.art.release", |
| 62 | "com.android.art.debug", |
| 63 | ], |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | art_cc_binary { |
| 67 | name: "imgdiagd", |
| 68 | defaults: [ |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 69 | "art_debug_defaults", |
Andreas Gampe | 5115efb | 2017-05-24 16:55:54 -0700 | [diff] [blame] | 70 | "imgdiag-defaults", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 71 | ], |
| 72 | shared_libs: [ |
| 73 | "libartd", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 74 | "libartbased", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 75 | "libartd-compiler", |
| 76 | ], |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame^] | 77 | apex_available: [ |
| 78 | "com.android.art.debug", |
| 79 | ], |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 80 | } |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 81 | |
| 82 | art_cc_test { |
| 83 | name: "art_imgdiag_tests", |
| 84 | defaults: [ |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 85 | "art_gtest_defaults", |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 86 | ], |
| 87 | srcs: ["imgdiag_test.cc"], |
| 88 | } |