Colin Cross | c7376e0 | 2016-09-08 12:52:18 -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 | |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 17 | art_cc_defaults { |
| 18 | name: "libart-dex2oat-defaults", |
| 19 | defaults: ["art_defaults"], |
| 20 | host_supported: true, |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 21 | srcs: [ |
| 22 | "linker/elf_writer.cc", |
| 23 | "linker/elf_writer_quick.cc", |
| 24 | "linker/image_writer.cc", |
| 25 | "linker/multi_oat_relative_patcher.cc", |
| 26 | "linker/oat_writer.cc", |
| 27 | ], |
| 28 | target: { |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 29 | android: { |
| 30 | // For atrace. |
| 31 | shared_libs: ["libcutils"], |
| 32 | }, |
| 33 | }, |
| 34 | generated_sources: ["art_dex2oat_operator_srcs"], |
| 35 | shared_libs: [ |
| 36 | "libart-compiler", |
| 37 | "libart-dexlayout", |
| 38 | "libbase", |
| 39 | "liblz4", |
| 40 | "liblzma", |
| 41 | ], |
| 42 | export_include_dirs: ["."], |
| 43 | |
| 44 | // For SHA-1 checksumming of build ID |
| 45 | static: { |
| 46 | whole_static_libs: ["libcrypto"], |
| 47 | }, |
| 48 | shared: { |
| 49 | shared_libs: ["libcrypto"], |
| 50 | }, |
| 51 | } |
| 52 | |
| 53 | gensrcs { |
| 54 | name: "art_dex2oat_operator_srcs", |
| 55 | cmd: "$(location generate-operator-out.py) art/dex2oat $(in) > $(out)", |
| 56 | tool_files: ["generate-operator-out.py"], |
| 57 | srcs: [ |
| 58 | "linker/image_writer.h", |
| 59 | ], |
| 60 | output_extension: "operator_out.cc", |
| 61 | } |
| 62 | |
| 63 | art_cc_static_library { |
| 64 | name: "libart-dex2oat", |
| 65 | defaults: ["libart-dex2oat-defaults"], |
| 66 | shared_libs: [ |
| 67 | "libart-compiler", |
Dan Willemsen | 2ca2780 | 2017-09-27 14:57:43 -0700 | [diff] [blame^] | 68 | "libart", |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 69 | ], |
| 70 | } |
| 71 | |
| 72 | art_cc_static_library { |
| 73 | name: "libartd-dex2oat", |
| 74 | defaults: [ |
| 75 | "art_debug_defaults", |
| 76 | "libart-dex2oat-defaults", |
| 77 | ], |
| 78 | shared_libs: [ |
| 79 | "libartd-compiler", |
Dan Willemsen | 2ca2780 | 2017-09-27 14:57:43 -0700 | [diff] [blame^] | 80 | "libartd", |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 81 | ], |
| 82 | } |
| 83 | |
Andreas Gampe | 7b56591 | 2017-03-20 15:48:52 -0700 | [diff] [blame] | 84 | cc_library_headers { |
| 85 | name: "dex2oat_headers", |
| 86 | host_supported: true, |
| 87 | export_include_dirs: ["include"], |
| 88 | } |
| 89 | |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 90 | cc_defaults { |
| 91 | name: "dex2oat-defaults", |
| 92 | host_supported: true, |
| 93 | defaults: ["art_defaults"], |
| 94 | srcs: ["dex2oat.cc"], |
| 95 | |
| 96 | target: { |
| 97 | android: { |
| 98 | // Use the 32-bit version of dex2oat on devices |
| 99 | compile_multilib: "prefer32", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 100 | }, |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 101 | }, |
| 102 | |
Andreas Gampe | 3157fc2 | 2017-08-23 09:43:46 -0700 | [diff] [blame] | 103 | header_libs: [ |
| 104 | "dex2oat_headers", |
| 105 | "art_cmdlineparser_headers", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 106 | ], |
| 107 | } |
| 108 | |
Nicolas Geoffray | afa7e45 | 2016-09-14 10:26:56 +0100 | [diff] [blame] | 109 | art_cc_binary { |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 110 | name: "dex2oat", |
| 111 | defaults: [ |
| 112 | "dex2oat-defaults", |
| 113 | ], |
| 114 | shared_libs: [ |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 115 | "libart-compiler", |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 116 | "libart-dexlayout", |
| 117 | "libart", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 118 | "libbase", |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 119 | "liblz4", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 120 | "libsigchain", |
| 121 | ], |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 122 | static_libs: [ |
| 123 | "libart-dex2oat", |
Dan Willemsen | 2ca2780 | 2017-09-27 14:57:43 -0700 | [diff] [blame^] | 124 | ], |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 125 | } |
| 126 | |
Nicolas Geoffray | afa7e45 | 2016-09-14 10:26:56 +0100 | [diff] [blame] | 127 | art_cc_binary { |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 128 | name: "dex2oatd", |
| 129 | defaults: [ |
| 130 | "art_debug_defaults", |
| 131 | "dex2oat-defaults", |
| 132 | ], |
| 133 | shared_libs: [ |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 134 | "libartd-compiler", |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 135 | "libartd-dexlayout", |
| 136 | "libartd", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 137 | "libbase", |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 138 | "liblz4", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 139 | "libsigchain", |
| 140 | ], |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 141 | static_libs: [ |
| 142 | "libartd-dex2oat", |
Dan Willemsen | 2ca2780 | 2017-09-27 14:57:43 -0700 | [diff] [blame^] | 143 | ], |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 144 | } |
| 145 | |
Nicolas Geoffray | afa7e45 | 2016-09-14 10:26:56 +0100 | [diff] [blame] | 146 | art_cc_binary { |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 147 | name: "dex2oats", |
| 148 | device_supported: false, |
| 149 | static_executable: true, |
| 150 | defaults: ["dex2oat-defaults"], |
Colin Cross | aa63aa2 | 2016-09-13 14:07:00 -0700 | [diff] [blame] | 151 | target: { |
| 152 | darwin: { |
| 153 | enabled: false, |
| 154 | }, |
| 155 | }, |
Colin Cross | 2cfc4ba | 2016-09-13 16:55:55 -0700 | [diff] [blame] | 156 | ldflags: [ |
| 157 | // We need this because GC stress mode makes use of |
| 158 | // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also |
| 159 | // defined in libgcc_eh.a(unwind-dw2.o) |
| 160 | // TODO: Having this is not ideal as it might obscure errors. |
| 161 | // Try to get rid of it. |
| 162 | "-z muldefs", |
| 163 | ], |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 164 | static_libs: [ |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 165 | "libart-dex2oat", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 166 | "libart-compiler", |
Jeff Hao | 608f2ce | 2016-10-19 11:17:11 -0700 | [diff] [blame] | 167 | "libart-dexlayout", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 168 | "libart", |
| 169 | "libvixl-arm", |
| 170 | "libvixl-arm64", |
| 171 | ] + art_static_dependencies, |
| 172 | } |
| 173 | |
Nicolas Geoffray | afa7e45 | 2016-09-14 10:26:56 +0100 | [diff] [blame] | 174 | art_cc_binary { |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 175 | name: "dex2oatds", |
| 176 | device_supported: false, |
| 177 | static_executable: true, |
| 178 | defaults: [ |
| 179 | "art_debug_defaults", |
| 180 | "dex2oat-defaults", |
| 181 | ], |
Colin Cross | aa63aa2 | 2016-09-13 14:07:00 -0700 | [diff] [blame] | 182 | target: { |
| 183 | darwin: { |
| 184 | enabled: false, |
| 185 | }, |
| 186 | }, |
Colin Cross | 2cfc4ba | 2016-09-13 16:55:55 -0700 | [diff] [blame] | 187 | ldflags: [ |
| 188 | // We need this because GC stress mode makes use of |
| 189 | // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also |
| 190 | // defined in libgcc_eh.a(unwind-dw2.o) |
| 191 | // TODO: Having this is not ideal as it might obscure errors. |
| 192 | // Try to get rid of it. |
| 193 | "-z muldefs", |
| 194 | ], |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 195 | static_libs: [ |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 196 | "libartd-dex2oat", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 197 | "libartd-compiler", |
Jeff Hao | 608f2ce | 2016-10-19 11:17:11 -0700 | [diff] [blame] | 198 | "libartd-dexlayout", |
Colin Cross | c7376e0 | 2016-09-08 12:52:18 -0700 | [diff] [blame] | 199 | "libartd", |
| 200 | "libvixld-arm", |
| 201 | "libvixld-arm64", |
| 202 | ] + art_static_dependencies, |
| 203 | } |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 204 | |
| 205 | art_cc_test { |
| 206 | name: "art_dex2oat_tests", |
| 207 | defaults: [ |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 208 | "art_gtest_defaults", |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 209 | ], |
Mathieu Chartier | f70fe3d | 2017-06-21 15:24:02 -0700 | [diff] [blame] | 210 | srcs: [ |
| 211 | "dex2oat_test.cc", |
| 212 | "dex2oat_image_test.cc", |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 213 | "linker/elf_writer_test.cc", |
| 214 | "linker/image_test.cc", |
| 215 | "linker/image_write_read_test.cc", |
| 216 | "linker/multi_oat_relative_patcher_test.cc", |
| 217 | "linker/oat_writer_test.cc", |
Mathieu Chartier | f70fe3d | 2017-06-21 15:24:02 -0700 | [diff] [blame] | 218 | ], |
Andreas Gampe | f788297 | 2017-03-20 16:35:24 -0700 | [diff] [blame] | 219 | header_libs: ["dex2oat_headers"], |
Vladimir Marko | 7452797 | 2016-11-29 15:57:32 +0000 | [diff] [blame] | 220 | shared_libs: [ |
| 221 | "libartd-compiler", |
| 222 | "libartd-dexlayout", |
| 223 | "libbase", |
| 224 | "liblz4", |
| 225 | "libsigchain", |
| 226 | ], |
| 227 | static_libs: [ |
| 228 | "libartd-dex2oat", |
Dan Willemsen | 2ca2780 | 2017-09-27 14:57:43 -0700 | [diff] [blame^] | 229 | ], |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 230 | } |