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