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