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