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