| Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 1 | // Copyright (C) 2015 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| Bob Badour | 9150de6 | 2021-02-26 03:22:24 -0800 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "art_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["art_license"], |
| 22 | } |
| 23 | |
| David Sehr | 5a1f629 | 2018-01-19 11:08:51 -0800 | [diff] [blame] | 24 | cc_defaults { |
| 25 | name: "dexdump_defaults", |
| Andreas Gampe | 70dfb69 | 2018-09-18 16:50:18 -0700 | [diff] [blame] | 26 | defaults: ["art_defaults"], |
| Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 27 | srcs: [ |
| David Sehr | caacd11 | 2016-10-20 16:27:02 -0700 | [diff] [blame] | 28 | "dexdump_cfg.cc", |
| Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 29 | "dexdump_main.cc", |
| 30 | "dexdump.cc", |
| 31 | ], |
| David Sehr | 5a1f629 | 2018-01-19 11:08:51 -0800 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | art_cc_binary { |
| David Sehr | 4f215d1 | 2019-04-03 09:28:21 -0700 | [diff] [blame] | 35 | name: "dexdump", |
| David Sehr | 5a1f629 | 2018-01-19 11:08:51 -0800 | [diff] [blame] | 36 | defaults: ["dexdump_defaults"], |
| 37 | host_supported: true, |
| Colin Cross | a9c0532 | 2017-10-19 10:25:42 -0700 | [diff] [blame] | 38 | target: { |
| Orion Hodson | 520a436 | 2019-04-18 09:34:45 +0100 | [diff] [blame] | 39 | android: { |
| 40 | shared_libs: [ |
| 41 | "libdexfile", |
| 42 | "libartbase", |
| 43 | "libbase", |
| 44 | ], |
| 45 | }, |
| 46 | // Use static libs on host: required for Windows build and |
| 47 | // static_sdk_tools build. |
| 48 | host: { |
| Martin Stjernholm | 2b527c4 | 2021-05-11 19:23:52 +0100 | [diff] [blame] | 49 | stl: "libc++_static", |
| David Sehr | 4f215d1 | 2019-04-03 09:28:21 -0700 | [diff] [blame] | 50 | static_libs: [ |
| 51 | "libdexfile", |
| 52 | "libartbase", |
| 53 | "libbase", |
| 54 | "libartpalette", |
| 55 | "liblog", |
| 56 | "libz", |
| 57 | "libziparchive", |
| 58 | ], |
| David Srbecky | b29ecc1 | 2019-04-15 15:10:59 +0100 | [diff] [blame] | 59 | }, |
| Greg Hartman | 063c985 | 2019-04-18 23:49:41 +0000 | [diff] [blame] | 60 | darwin: { |
| 61 | enabled: true, |
| 62 | }, |
| Martin Stjernholm | 7cdd7d9 | 2021-05-19 21:58:41 +0100 | [diff] [blame] | 63 | windows: { |
| 64 | // dexdump is provided in the Windows SDK. |
| 65 | enabled: true, |
| 66 | }, |
| Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 67 | }, |
| Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 68 | apex_available: [ |
| Martin Stjernholm | 3e9abfc | 2020-10-09 22:17:51 +0100 | [diff] [blame] | 69 | "com.android.art", |
| Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 70 | "com.android.art.debug", |
| Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 71 | ], |
| Colin Cross | a9c0532 | 2017-10-19 10:25:42 -0700 | [diff] [blame] | 72 | } |
| 73 | |
| Roland Levillain | f040914 | 2021-03-22 15:45:03 +0000 | [diff] [blame] | 74 | art_cc_defaults { |
| 75 | name: "art_dexdump_tests_defaults", |
| Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 76 | srcs: ["dexdump_test.cc"], |
| Yo Chiang | 169dfb4 | 2020-08-07 04:22:18 +0000 | [diff] [blame] | 77 | target: { |
| 78 | host: { |
| 79 | required: ["dexdump"], |
| 80 | }, |
| 81 | }, |
| Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 82 | } |
| Roland Levillain | f040914 | 2021-03-22 15:45:03 +0000 | [diff] [blame] | 83 | |
| 84 | // Version of ART gtest `art_dexdump_tests` bundled with the ART APEX on target. |
| 85 | // TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete. |
| 86 | art_cc_test { |
| 87 | name: "art_dexdump_tests", |
| 88 | defaults: [ |
| 89 | "art_gtest_defaults", |
| 90 | "art_dexdump_tests_defaults", |
| 91 | ], |
| 92 | } |
| 93 | |
| 94 | // Standalone version of ART gtest `art_dexdump_tests`, not bundled with the ART APEX on target. |
| 95 | art_cc_test { |
| 96 | name: "art_standalone_dexdump_tests", |
| 97 | defaults: [ |
| 98 | "art_standalone_gtest_defaults", |
| 99 | "art_dexdump_tests_defaults", |
| 100 | ], |
| 101 | } |