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