Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2011 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 | cc_defaults { |
| 18 | name: "oatdump-defaults", |
| 19 | defaults: ["art_defaults"], |
| 20 | host_supported: true, |
| 21 | srcs: ["oatdump.cc"], |
Andreas Gampe | 3157fc2 | 2017-08-23 09:43:46 -0700 | [diff] [blame] | 22 | header_libs: [ |
| 23 | "art_cmdlineparser_headers", |
| 24 | ], |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | art_cc_binary { |
| 28 | name: "oatdump", |
| 29 | defaults: ["oatdump-defaults"], |
| 30 | shared_libs: [ |
| 31 | "libart", |
| 32 | "libart-compiler", |
Anestis Bechtsoudis | 8583bec | 2018-09-08 22:32:29 +0300 | [diff] [blame] | 33 | "libart-dexlayout", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 34 | "libart-disassembler", |
David Sehr | 0225f8e | 2018-01-31 08:52:24 +0000 | [diff] [blame] | 35 | "libdexfile", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 36 | "libartbase", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 37 | "libprofile", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 38 | "libbase", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 39 | ], |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 40 | apex_available: [ |
| 41 | "com.android.art.release", |
| 42 | "com.android.art.debug", |
| 43 | ], |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 44 | } |
| 45 | |
| 46 | art_cc_binary { |
| 47 | name: "oatdumpd", |
| 48 | defaults: [ |
| 49 | "art_debug_defaults", |
| 50 | "oatdump-defaults", |
| 51 | ], |
| 52 | shared_libs: [ |
| 53 | "libartd", |
| 54 | "libartd-compiler", |
Anestis Bechtsoudis | 8583bec | 2018-09-08 22:32:29 +0300 | [diff] [blame] | 55 | "libartd-dexlayout", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 56 | "libartd-disassembler", |
David Sehr | fcbe15c | 2018-02-15 09:41:13 -0800 | [diff] [blame] | 57 | "libdexfiled", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 58 | "libartbased", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 59 | "libprofiled", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 60 | "libbase", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 61 | ], |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 62 | apex_available: [ |
| 63 | "com.android.art.debug", |
| 64 | ], |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 65 | } |
| 66 | |
Andreas Gampe | 11bf265 | 2018-07-10 14:21:15 -0700 | [diff] [blame] | 67 | cc_defaults { |
| 68 | name: "oatdumps-defaults", |
Colin Cross | d2c2080 | 2016-09-19 12:57:18 -0700 | [diff] [blame] | 69 | device_supported: false, |
Roland Levillain | 7f07f55 | 2016-11-22 17:20:46 +0000 | [diff] [blame] | 70 | static_executable: true, |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 71 | defaults: [ |
| 72 | "oatdump-defaults", |
| 73 | ], |
Colin Cross | 8dd9068 | 2016-09-08 16:43:27 -0700 | [diff] [blame] | 74 | target: { |
| 75 | darwin: { |
| 76 | enabled: false, |
| 77 | }, |
| 78 | }, |
Roland Levillain | 7f07f55 | 2016-11-22 17:20:46 +0000 | [diff] [blame] | 79 | ldflags: [ |
| 80 | // We need this because GC stress mode makes use of |
| 81 | // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also |
| 82 | // defined in libgcc_eh.a(unwind-dw2.o) |
| 83 | // TODO: Having this is not ideal as it might obscure errors. |
| 84 | // Try to get rid of it. |
| 85 | "-z muldefs", |
| 86 | ], |
David Srbecky | d3ee902 | 2020-07-27 16:05:38 +0100 | [diff] [blame^] | 87 | static_libs: ["libsigchain_fake"], |
Andreas Gampe | 11bf265 | 2018-07-10 14:21:15 -0700 | [diff] [blame] | 88 | } |
| 89 | |
| 90 | art_cc_binary { |
| 91 | name: "oatdumps", |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 92 | defaults: [ |
| 93 | "libart_static_defaults", |
| 94 | "libartbase_static_defaults", |
| 95 | "libdexfile_static_defaults", |
| 96 | "libprofile_static_defaults", |
| 97 | "libart-compiler_static_defaults", |
Anestis Bechtsoudis | 8583bec | 2018-09-08 22:32:29 +0300 | [diff] [blame] | 98 | "libart-dexlayout_static_defaults", |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 99 | "oatdumps-defaults", |
| 100 | ], |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 101 | static_libs: [ |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 102 | "libart-disassembler", |
Roland Levillain | 12dd9ae | 2018-11-06 13:32:06 +0000 | [diff] [blame] | 103 | "libvixl", |
Andreas Gampe | 11bf265 | 2018-07-10 14:21:15 -0700 | [diff] [blame] | 104 | ], |
Martin Stjernholm | 7e7ab23 | 2019-02-01 12:58:08 +0000 | [diff] [blame] | 105 | // We need this to resolve libartpalette symbols |
| 106 | // correctly. Multiple source libraries depend on it. |
Martin Stjernholm | 84bf698 | 2019-02-05 15:07:57 +0000 | [diff] [blame] | 107 | // TODO(b/122885634): This is also necessary for the static lib ordering bug |
| 108 | // with APEX stubs. |
Martin Stjernholm | 23b2704 | 2019-01-11 10:36:35 +0000 | [diff] [blame] | 109 | group_static_libs: true, |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 110 | } |
| 111 | |
| 112 | art_cc_binary { |
| 113 | name: "oatdumpds", |
| 114 | defaults: [ |
| 115 | "art_debug_defaults", |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 116 | "libartd_static_defaults", |
| 117 | "libartbased_static_defaults", |
| 118 | "libdexfiled_static_defaults", |
| 119 | "libprofiled_static_defaults", |
| 120 | "libartd-compiler_static_defaults", |
Anestis Bechtsoudis | 8583bec | 2018-09-08 22:32:29 +0300 | [diff] [blame] | 121 | "libartd-dexlayout_static_defaults", |
Andreas Gampe | 11bf265 | 2018-07-10 14:21:15 -0700 | [diff] [blame] | 122 | "oatdumps-defaults", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 123 | ], |
Colin Cross | 8dd9068 | 2016-09-08 16:43:27 -0700 | [diff] [blame] | 124 | target: { |
Pirama Arumuga Nainar | 6f5b4d2 | 2018-04-20 12:02:02 -0700 | [diff] [blame] | 125 | linux_glibc_x86_64: { |
| 126 | use_clang_lld: true, |
| 127 | }, |
Colin Cross | 8dd9068 | 2016-09-08 16:43:27 -0700 | [diff] [blame] | 128 | }, |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 129 | static_libs: [ |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 130 | "libartd-disassembler", |
Roland Levillain | 12dd9ae | 2018-11-06 13:32:06 +0000 | [diff] [blame] | 131 | "libvixld", |
Andreas Gampe | 11bf265 | 2018-07-10 14:21:15 -0700 | [diff] [blame] | 132 | ], |
Andreas Gampe | 802bcf5 | 2018-09-07 16:20:58 -0700 | [diff] [blame] | 133 | group_static_libs: true, |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 134 | } |
| 135 | |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 136 | art_cc_test { |
| 137 | name: "art_oatdump_tests", |
| 138 | defaults: [ |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 139 | "art_gtest_defaults", |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 140 | ], |
David Srbecky | 4a88a5a | 2020-05-05 16:21:57 +0100 | [diff] [blame] | 141 | data: [ |
| 142 | ":art-gtest-jars-ProfileTestMultiDex", |
| 143 | ], |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 144 | srcs: [ |
Vladimir Marko | 421087b | 2018-02-27 11:00:17 +0000 | [diff] [blame] | 145 | "oatdump_app_test.cc", |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 146 | "oatdump_test.cc", |
| 147 | "oatdump_image_test.cc", |
| 148 | ], |
David Srbecky | 2280b53 | 2020-05-27 00:30:44 +0100 | [diff] [blame] | 149 | required: [ |
| 150 | "oatdumpd", |
| 151 | "oatdumpds", |
| 152 | "dexdump", |
| 153 | "dex2oatd", |
David Srbecky | 4a88a5a | 2020-05-05 16:21:57 +0100 | [diff] [blame] | 154 | "dex2oatds", |
David Srbecky | 2280b53 | 2020-05-27 00:30:44 +0100 | [diff] [blame] | 155 | ], |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 156 | } |