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