David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [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: "libdexfile_defaults", |
| 19 | defaults: ["art_defaults"], |
| 20 | host_supported: true, |
| 21 | srcs: [ |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 22 | "dex/art_dex_file_loader.cc", |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 23 | "dex/compact_dex_file.cc", |
Mathieu Chartier | 5e3cfa2 | 2018-02-20 16:53:37 -0800 | [diff] [blame] | 24 | "dex/compact_offset_table.cc", |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 25 | "dex/descriptors_names.cc", |
| 26 | "dex/dex_file.cc", |
| 27 | "dex/dex_file_exception_helpers.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 28 | "dex/dex_file_layout.cc", |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 29 | "dex/dex_file_loader.cc", |
| 30 | "dex/dex_file_tracking_registrar.cc", |
| 31 | "dex/dex_file_verifier.cc", |
| 32 | "dex/dex_instruction.cc", |
| 33 | "dex/modifiers.cc", |
David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 34 | "dex/primitive.cc", |
Andreas Gampe | ad1aa63 | 2019-01-02 10:30:54 -0800 | [diff] [blame] | 35 | "dex/signature.cc", |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 36 | "dex/standard_dex_file.cc", |
David Sehr | 9c4a015 | 2018-04-05 12:23:54 -0700 | [diff] [blame] | 37 | "dex/type_lookup_table.cc", |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 38 | "dex/utf.cc", |
| 39 | ], |
| 40 | |
| 41 | target: { |
| 42 | android: { |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 43 | static_libs: [ |
| 44 | "libziparchive", |
| 45 | "libz", |
| 46 | ], |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 47 | shared_libs: [ |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 48 | // For MemMap. |
| 49 | "libartpalette", |
| 50 | "liblog", |
| 51 | // For common macros. |
| 52 | "libbase", |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 53 | ], |
| 54 | export_shared_lib_headers: [ |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 55 | "libbase", |
| 56 | ], |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 57 | }, |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 58 | not_windows: { |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 59 | shared_libs: [ |
| 60 | "libziparchive", |
| 61 | "libz", |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 62 | // For MemMap. |
| 63 | "libartpalette", |
| 64 | "liblog", |
| 65 | // For common macros. |
| 66 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 67 | ], |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 68 | export_shared_lib_headers: [ |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 69 | "libbase", |
| 70 | ], |
| 71 | }, |
| 72 | windows: { |
| 73 | static_libs: [ |
| 74 | "libziparchive", |
| 75 | "libz", |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 76 | // For MemMap. |
| 77 | "libartpalette", |
| 78 | "liblog", |
| 79 | // For common macros. |
| 80 | "libbase", |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 81 | ], |
| 82 | export_static_lib_headers: [ |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 83 | "libbase", |
| 84 | ], |
| 85 | cflags: ["-Wno-thread-safety"], |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 86 | }, |
David Srbecky | d53f606 | 2019-03-22 14:55:21 +0000 | [diff] [blame] | 87 | darwin: { |
| 88 | enabled: true, |
| 89 | }, |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 90 | }, |
| 91 | generated_sources: ["dexfile_operator_srcs"], |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 92 | export_include_dirs: ["."], |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 93 | } |
| 94 | |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 95 | cc_defaults { |
| 96 | name: "libdexfile_static_base_defaults", |
| 97 | static_libs: [ |
| 98 | "libbase", |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 99 | "liblog", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 100 | "libz", |
| 101 | "libziparchive", |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 102 | ], |
| 103 | } |
| 104 | |
| 105 | cc_defaults { |
| 106 | name: "libdexfile_static_defaults", |
| 107 | defaults: [ |
| 108 | "libartbase_static_defaults", |
| 109 | "libdexfile_static_base_defaults", |
| 110 | ], |
Martin Stjernholm | b4abe0a | 2019-05-17 19:22:55 +0100 | [diff] [blame] | 111 | defaults_visibility: [ |
| 112 | "//art:__subpackages__", |
Martin Stjernholm | b4abe0a | 2019-05-17 19:22:55 +0100 | [diff] [blame] | 113 | ], |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 114 | static_libs: ["libdexfile"], |
| 115 | } |
| 116 | |
| 117 | cc_defaults { |
| 118 | name: "libdexfiled_static_defaults", |
| 119 | defaults: [ |
| 120 | "libartbased_static_defaults", |
| 121 | "libdexfile_static_base_defaults", |
| 122 | ], |
| 123 | static_libs: ["libdexfiled"], |
| 124 | } |
| 125 | |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 126 | gensrcs { |
| 127 | name: "dexfile_operator_srcs", |
Alex Light | b69d2d3 | 2018-02-21 13:37:17 -0800 | [diff] [blame] | 128 | cmd: "$(location generate_operator_out) art/libdexfile $(in) > $(out)", |
| 129 | tools: ["generate_operator_out"], |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 130 | srcs: [ |
| 131 | "dex/dex_file.h", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 132 | "dex/dex_file_layout.h", |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 133 | "dex/dex_instruction.h", |
| 134 | "dex/dex_instruction_utils.h", |
| 135 | "dex/invoke_type.h", |
David Sehr | 312f3b2 | 2018-03-19 08:39:26 -0700 | [diff] [blame] | 136 | "dex/method_reference.h", |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 137 | ], |
| 138 | output_extension: "operator_out.cc", |
| 139 | } |
| 140 | |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 141 | art_cc_library { |
| 142 | name: "libdexfile", |
| 143 | defaults: ["libdexfile_defaults"], |
| 144 | // Leave the symbols in the shared library so that stack unwinders can |
| 145 | // produce meaningful name resolution. |
| 146 | strip: { |
| 147 | keep_symbols: true, |
| 148 | }, |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 149 | target: { |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 150 | android: { |
| 151 | shared_libs: [ |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 152 | "libartbase", |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 153 | ], |
| 154 | export_shared_lib_headers: [ |
| 155 | "libartbase", |
| 156 | ], |
| 157 | }, |
| 158 | not_windows: { |
| 159 | shared_libs: [ |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 160 | "libartbase", |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 161 | ], |
| 162 | export_shared_lib_headers: [ |
| 163 | "libartbase", |
| 164 | ], |
| 165 | }, |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 166 | windows: { |
| 167 | enabled: true, |
| 168 | shared: { |
| 169 | enabled: false, |
| 170 | }, |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 171 | static_libs: [ |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 172 | "libartbase", |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 173 | ], |
| 174 | export_static_lib_headers: [ |
| 175 | "libartbase", |
| 176 | ], |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 177 | }, |
| 178 | }, |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 179 | } |
| 180 | |
David Sehr | fcbe15c | 2018-02-15 09:41:13 -0800 | [diff] [blame] | 181 | art_cc_library { |
| 182 | name: "libdexfiled", |
| 183 | defaults: [ |
| 184 | "art_debug_defaults", |
| 185 | "libdexfile_defaults", |
| 186 | ], |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 187 | target: { |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 188 | android: { |
| 189 | shared_libs: [ |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 190 | "libartbased", |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 191 | ], |
| 192 | export_shared_lib_headers: [ |
| 193 | "libartbased", |
| 194 | ], |
| 195 | }, |
| 196 | not_windows: { |
| 197 | shared_libs: [ |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 198 | "libartbased", |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 199 | ], |
| 200 | export_shared_lib_headers: [ |
| 201 | "libartbased", |
| 202 | ], |
| 203 | }, |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 204 | windows: { |
| 205 | enabled: true, |
| 206 | shared: { |
| 207 | enabled: false, |
| 208 | }, |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 209 | static_libs: [ |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 210 | "libartbased", |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 211 | ], |
| 212 | export_static_lib_headers: [ |
| 213 | "libartbased", |
| 214 | ], |
David Sehr | 10db8fe | 2018-07-18 11:01:20 -0700 | [diff] [blame] | 215 | }, |
| 216 | }, |
David Sehr | fcbe15c | 2018-02-15 09:41:13 -0800 | [diff] [blame] | 217 | } |
| 218 | |
Martin Stjernholm | fdb2f60 | 2019-01-09 14:47:00 +0000 | [diff] [blame] | 219 | art_cc_test { |
| 220 | name: "art_libdexfile_tests", |
| 221 | defaults: [ |
| 222 | "art_gtest_defaults", |
| 223 | ], |
| 224 | srcs: [ |
| 225 | "dex/art_dex_file_loader_test.cc", |
| 226 | "dex/class_accessor_test.cc", |
| 227 | "dex/code_item_accessors_test.cc", |
| 228 | "dex/compact_dex_file_test.cc", |
| 229 | "dex/compact_offset_table_test.cc", |
| 230 | "dex/descriptors_names_test.cc", |
| 231 | "dex/test_dex_file_builder_test.cc", |
| 232 | "dex/dex_file_loader_test.cc", |
| 233 | "dex/dex_file_verifier_test.cc", |
| 234 | "dex/dex_instruction_test.cc", |
| 235 | "dex/primitive_test.cc", |
| 236 | "dex/string_reference_test.cc", |
| 237 | "dex/type_lookup_table_test.cc", |
| 238 | "dex/utf_test.cc", |
| 239 | ], |
| 240 | shared_libs: [ |
| 241 | "libbacktrace", |
| 242 | "libziparchive", |
| 243 | ], |
Martin Stjernholm | fdb2f60 | 2019-01-09 14:47:00 +0000 | [diff] [blame] | 244 | } |
| 245 | |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 246 | cc_library_headers { |
| 247 | name: "libdexfile_external_headers", |
Martin Stjernholm | b4abe0a | 2019-05-17 19:22:55 +0100 | [diff] [blame] | 248 | visibility: ["//visibility:public"], |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 249 | host_supported: true, |
Martin Stjernholm | fe94b1c | 2019-01-31 17:40:39 +0000 | [diff] [blame] | 250 | vendor_available: true, |
| 251 | recovery_available: true, |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 252 | header_libs: ["libbase_headers"], |
| 253 | export_header_lib_headers: ["libbase_headers"], |
| 254 | export_include_dirs: ["external/include"], |
| 255 | |
| 256 | target: { |
| 257 | windows: { |
| 258 | enabled: true, |
| 259 | }, |
| 260 | }, |
| 261 | } |
| 262 | |
Paul Duffin | 4345aac | 2019-07-17 15:51:54 +0100 | [diff] [blame] | 263 | // Make dex_instruction_list.h available for tools/jvmti-agents/titrace |
| 264 | cc_library_headers { |
| 265 | name: "libdexfile_all_headers", |
| 266 | visibility: ["//art:__subpackages__"], |
| 267 | host_supported: true, |
| 268 | export_include_dirs: ["."], |
| 269 | } |
| 270 | |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 271 | cc_defaults { |
| 272 | name: "libdexfile_external-defaults", |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 273 | host_supported: true, |
| 274 | srcs: [ |
| 275 | "external/dex_file_ext.cc", |
| 276 | ], |
| 277 | header_libs: ["libdexfile_external_headers"], |
| 278 | shared_libs: [ |
| 279 | "libbase", |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 280 | ], |
Martin Stjernholm | 84bf698 | 2019-02-05 15:07:57 +0000 | [diff] [blame] | 281 | stubs: { |
| 282 | symbol_file: "external/libdexfile_external.map.txt", |
| 283 | versions: ["1"], |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 284 | }, |
Jiyong Park | 7ed5e60 | 2019-09-04 17:25:23 +0900 | [diff] [blame] | 285 | export_header_lib_headers: ["libdexfile_external_headers"], |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 286 | } |
| 287 | |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 288 | cc_library { |
| 289 | name: "libdexfile_external", |
| 290 | defaults: [ |
| 291 | "art_defaults", |
| 292 | "libdexfile_external-defaults", |
| 293 | ], |
Martin Stjernholm | b4abe0a | 2019-05-17 19:22:55 +0100 | [diff] [blame] | 294 | visibility: ["//visibility:public"], |
David Srbecky | 52fc7ab | 2019-05-03 11:03:52 +0100 | [diff] [blame] | 295 | target: { |
| 296 | darwin: { |
| 297 | enabled: true, |
| 298 | }, |
| 299 | }, |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 300 | shared_libs: [ |
| 301 | "libdexfile", |
| 302 | ], |
| 303 | } |
| 304 | |
| 305 | cc_library { |
| 306 | name: "libdexfiled_external", |
| 307 | defaults: [ |
| 308 | "art_debug_defaults", |
| 309 | "libdexfile_external-defaults", |
| 310 | ], |
David Srbecky | 52fc7ab | 2019-05-03 11:03:52 +0100 | [diff] [blame] | 311 | target: { |
| 312 | darwin: { |
| 313 | enabled: true, |
| 314 | }, |
| 315 | }, |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 316 | shared_libs: [ |
| 317 | "libdexfiled", |
| 318 | ], |
| 319 | } |
| 320 | |
Martin Stjernholm | fdb2f60 | 2019-01-09 14:47:00 +0000 | [diff] [blame] | 321 | art_cc_test { |
| 322 | name: "art_libdexfile_external_tests", |
| 323 | host_supported: true, |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 324 | test_per_src: true, // For consistency with other ART gtests. |
Martin Stjernholm | fdb2f60 | 2019-01-09 14:47:00 +0000 | [diff] [blame] | 325 | srcs: [ |
| 326 | "external/dex_file_ext_c_test.c", |
| 327 | ], |
| 328 | header_libs: ["libdexfile_external_headers"], |
| 329 | } |
| 330 | |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 331 | // Support library with a C++ API for accessing the libdexfile API for external |
Martin Stjernholm | fe94b1c | 2019-01-31 17:40:39 +0000 | [diff] [blame] | 332 | // (non-ART) users. |
| 333 | // |
| 334 | // This library dlopens libdexfile_external on first use, so there is no build |
| 335 | // time dependency on dex file logic. It is therefore safe to use from binaries |
| 336 | // compiled without dex file support, given they won't encounter any dex file |
| 337 | // stack frames. |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 338 | cc_library { |
| 339 | name: "libdexfile_support", |
Martin Stjernholm | b4abe0a | 2019-05-17 19:22:55 +0100 | [diff] [blame] | 340 | visibility: ["//visibility:public"], |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 341 | host_supported: true, |
Martin Stjernholm | fe94b1c | 2019-01-31 17:40:39 +0000 | [diff] [blame] | 342 | vendor_available: true, |
| 343 | recovery_available: true, |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 344 | srcs: [ |
| 345 | "external/dex_file_supp.cc", |
| 346 | ], |
Martin Stjernholm | fe94b1c | 2019-01-31 17:40:39 +0000 | [diff] [blame] | 347 | required: ["libdexfile_external"], |
| 348 | shared_libs: ["liblog"], |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 349 | header_libs: ["libdexfile_external_headers"], |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 350 | export_header_lib_headers: ["libdexfile_external_headers"], |
Martin Stjernholm | fe94b1c | 2019-01-31 17:40:39 +0000 | [diff] [blame] | 351 | target: { |
| 352 | recovery: { |
| 353 | cflags: ["-DNO_DEXFILE_SUPPORT"], |
| 354 | }, |
| 355 | vendor: { |
| 356 | cflags: ["-DNO_DEXFILE_SUPPORT"], |
| 357 | }, |
| 358 | }, |
Martin Stjernholm | b3d2e83 | 2018-11-15 18:09:35 +0000 | [diff] [blame] | 359 | } |
Martin Stjernholm | 750bf04 | 2019-01-09 22:51:12 +0000 | [diff] [blame] | 360 | |
Martin Stjernholm | 70ae00d | 2019-02-15 22:41:14 +0000 | [diff] [blame] | 361 | // The same source file is used in two tests here, so unlike other ART gtests it |
| 362 | // doesn't use test_per_src. Its test target is |
| 363 | // test-art-{host,target}-gtest-art_libdexfile_support_tests. |
Martin Stjernholm | 750bf04 | 2019-01-09 22:51:12 +0000 | [diff] [blame] | 364 | art_cc_test { |
| 365 | name: "art_libdexfile_support_tests", |
Roland Levillain | 61f0716 | 2019-06-26 12:44:04 +0100 | [diff] [blame] | 366 | defaults: [ |
| 367 | "art_test_defaults", |
| 368 | ], |
Martin Stjernholm | 750bf04 | 2019-01-09 22:51:12 +0000 | [diff] [blame] | 369 | host_supported: true, |
Martin Stjernholm | 750bf04 | 2019-01-09 22:51:12 +0000 | [diff] [blame] | 370 | srcs: [ |
| 371 | "external/dex_file_supp_test.cc", |
| 372 | ], |
| 373 | shared_libs: [ |
| 374 | "libartbase", |
| 375 | "libbase", |
| 376 | "libdexfile_external", |
| 377 | "libdexfile_support", |
| 378 | ], |
| 379 | } |
Martin Stjernholm | fe94b1c | 2019-01-31 17:40:39 +0000 | [diff] [blame] | 380 | |
Martin Stjernholm | 621afb4 | 2019-09-23 22:01:36 +0100 | [diff] [blame] | 381 | cc_defaults { |
| 382 | name: "libdexfile_support_static_defaults", |
Martin Stjernholm | d3ee98a | 2019-09-23 16:26:50 +0100 | [diff] [blame] | 383 | host_supported: true, |
Martin Stjernholm | fe94b1c | 2019-01-31 17:40:39 +0000 | [diff] [blame] | 384 | srcs: [ |
| 385 | "external/dex_file_supp.cc", |
| 386 | ], |
| 387 | cflags: ["-DSTATIC_LIB"], |
| 388 | // Using whole_static_libs here only as a "poor man's transitivity" kludge. |
| 389 | whole_static_libs: [ |
| 390 | "libbase", |
Martin Stjernholm | fe94b1c | 2019-01-31 17:40:39 +0000 | [diff] [blame] | 391 | "liblog", |
| 392 | "libz", |
| 393 | "libziparchive", |
| 394 | ], |
| 395 | header_libs: ["libdexfile_external_headers"], |
| 396 | export_header_lib_headers: ["libdexfile_external_headers"], |
| 397 | } |
| 398 | |
Martin Stjernholm | 621afb4 | 2019-09-23 22:01:36 +0100 | [diff] [blame] | 399 | cc_library_static { |
| 400 | name: "libdexfile_support_static", |
| 401 | visibility: [ |
| 402 | "//art:__subpackages__", |
| 403 | // TODO(b/133140750): Clean this up. |
| 404 | "//system/core/debuggerd", |
| 405 | "//system/core/init", // Dependency from Android.mk file, so not enforced. |
| 406 | "//system/extras/simpleperf", |
| 407 | ], |
| 408 | defaults: [ |
| 409 | "libdexfile_static_defaults", |
| 410 | "libdexfile_support_static_defaults", |
| 411 | ], |
| 412 | whole_static_libs: [ |
| 413 | "libdexfile", |
| 414 | "libdexfile_external", |
| 415 | ], |
| 416 | } |
| 417 | |
| 418 | cc_library_static { |
| 419 | name: "libdexfiled_support_static", |
| 420 | defaults: [ |
| 421 | "libdexfile_support_static_defaults", |
| 422 | "libdexfiled_static_defaults", |
| 423 | ], |
| 424 | whole_static_libs: [ |
| 425 | "libdexfiled", |
| 426 | "libdexfiled_external", |
| 427 | ], |
| 428 | } |
| 429 | |
Martin Stjernholm | 70ae00d | 2019-02-15 22:41:14 +0000 | [diff] [blame] | 430 | // The same source file is used in two tests here, so unlike other ART gtests it |
| 431 | // doesn't use test_per_src. Its test target is |
| 432 | // test-art-{host,target}-gtest-art_libdexfile_support_static_tests. |
Martin Stjernholm | fe94b1c | 2019-01-31 17:40:39 +0000 | [diff] [blame] | 433 | art_cc_test { |
| 434 | name: "art_libdexfile_support_static_tests", |
| 435 | host_supported: true, |
| 436 | srcs: [ |
| 437 | "external/dex_file_supp_test.cc", |
| 438 | ], |
| 439 | static_libs: [ |
| 440 | "libbase", |
| 441 | "libdexfile_support_static", |
| 442 | ], |
| 443 | } |