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"], |
| 22 | target: { |
| 23 | android: { |
| 24 | shared_libs: ["libcutils"], |
| 25 | }, |
| 26 | }, |
Chih-Hung Hsieh | 238c963 | 2018-05-08 10:22:52 -0700 | [diff] [blame] | 27 | // b/79417743, oatdump 32-bit tests failed with clang lld |
| 28 | use_clang_lld: false, |
Andreas Gampe | 3157fc2 | 2017-08-23 09:43:46 -0700 | [diff] [blame] | 29 | header_libs: [ |
| 30 | "art_cmdlineparser_headers", |
| 31 | ], |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | art_cc_binary { |
| 35 | name: "oatdump", |
| 36 | defaults: ["oatdump-defaults"], |
| 37 | shared_libs: [ |
| 38 | "libart", |
| 39 | "libart-compiler", |
Anestis Bechtsoudis | 8583bec | 2018-09-08 22:32:29 +0300 | [diff] [blame] | 40 | "libart-dexlayout", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 41 | "libart-disassembler", |
David Sehr | 0225f8e | 2018-01-31 08:52:24 +0000 | [diff] [blame] | 42 | "libdexfile", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 43 | "libartbase", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 44 | "libprofile", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 45 | "libbase", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 46 | ], |
| 47 | } |
| 48 | |
| 49 | art_cc_binary { |
| 50 | name: "oatdumpd", |
| 51 | defaults: [ |
| 52 | "art_debug_defaults", |
| 53 | "oatdump-defaults", |
| 54 | ], |
| 55 | shared_libs: [ |
| 56 | "libartd", |
| 57 | "libartd-compiler", |
Anestis Bechtsoudis | 8583bec | 2018-09-08 22:32:29 +0300 | [diff] [blame] | 58 | "libartd-dexlayout", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 59 | "libartd-disassembler", |
David Sehr | fcbe15c | 2018-02-15 09:41:13 -0800 | [diff] [blame] | 60 | "libdexfiled", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 61 | "libartbased", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 62 | "libprofiled", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 63 | "libbase", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 64 | ], |
| 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 | ], |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 87 | static_libs: ["libsigchain_dummy"], |
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 | ], |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | art_cc_binary { |
| 108 | name: "oatdumpds", |
| 109 | defaults: [ |
| 110 | "art_debug_defaults", |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 111 | "libartd_static_defaults", |
| 112 | "libartbased_static_defaults", |
| 113 | "libdexfiled_static_defaults", |
| 114 | "libprofiled_static_defaults", |
| 115 | "libartd-compiler_static_defaults", |
Anestis Bechtsoudis | 8583bec | 2018-09-08 22:32:29 +0300 | [diff] [blame] | 116 | "libartd-dexlayout_static_defaults", |
Andreas Gampe | 11bf265 | 2018-07-10 14:21:15 -0700 | [diff] [blame] | 117 | "oatdumps-defaults", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 118 | ], |
Colin Cross | 8dd9068 | 2016-09-08 16:43:27 -0700 | [diff] [blame] | 119 | target: { |
Pirama Arumuga Nainar | 6f5b4d2 | 2018-04-20 12:02:02 -0700 | [diff] [blame] | 120 | linux_glibc_x86_64: { |
| 121 | use_clang_lld: true, |
| 122 | }, |
Colin Cross | 8dd9068 | 2016-09-08 16:43:27 -0700 | [diff] [blame] | 123 | }, |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 124 | static_libs: [ |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 125 | "libartd-disassembler", |
Roland Levillain | 12dd9ae | 2018-11-06 13:32:06 +0000 | [diff] [blame^] | 126 | "libvixld", |
Andreas Gampe | 11bf265 | 2018-07-10 14:21:15 -0700 | [diff] [blame] | 127 | ], |
Andreas Gampe | 802bcf5 | 2018-09-07 16:20:58 -0700 | [diff] [blame] | 128 | group_static_libs: true, |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 129 | } |
| 130 | |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 131 | art_cc_test { |
| 132 | name: "art_oatdump_tests", |
| 133 | defaults: [ |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 134 | "art_gtest_defaults", |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 135 | ], |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 136 | srcs: [ |
Vladimir Marko | 421087b | 2018-02-27 11:00:17 +0000 | [diff] [blame] | 137 | "oatdump_app_test.cc", |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 138 | "oatdump_test.cc", |
| 139 | "oatdump_image_test.cc", |
| 140 | ], |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 141 | } |