Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 1 | // Copyright (C) 2016 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Bob Badour | 9150de6 | 2021-02-26 03:22:24 -0800 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "art_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["art_license"], |
| 22 | } |
| 23 | |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 24 | art_cc_defaults { |
| 25 | name: "libart-dexlayout-defaults", |
David Sehr | 7639cdc | 2017-04-15 10:06:21 -0700 | [diff] [blame] | 26 | defaults: ["art_defaults"], |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 27 | host_supported: true, |
| 28 | srcs: [ |
Mathieu Chartier | f95a75e | 2017-11-03 15:25:52 -0700 | [diff] [blame] | 29 | "compact_dex_writer.cc", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 30 | "dexlayout.cc", |
Jeff Hao | 3ab96b4 | 2016-09-09 18:35:01 -0700 | [diff] [blame] | 31 | "dex_ir.cc", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 32 | "dex_ir_builder.cc", |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 33 | "dex_verify.cc", |
David Sehr | cdcfde7 | 2016-09-26 07:44:04 -0700 | [diff] [blame] | 34 | "dex_visualize.cc", |
Jeff Hao | a862100 | 2016-10-04 18:13:44 +0000 | [diff] [blame] | 35 | "dex_writer.cc", |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 36 | ], |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 37 | export_include_dirs: ["."], |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 38 | target: { |
| 39 | android: { |
| 40 | shared_libs: [ |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 41 | "libartpalette", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 42 | "libbase", |
| 43 | ], |
| 44 | }, |
| 45 | not_windows: { |
| 46 | shared_libs: [ |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 47 | "libartpalette", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 48 | "libbase", |
| 49 | ], |
| 50 | }, |
| 51 | windows: { |
| 52 | cflags: ["-Wno-thread-safety"], |
| 53 | static_libs: [ |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 54 | "libartpalette", |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 55 | "libbase", |
| 56 | ], |
| 57 | }, |
| 58 | }, |
Jiyong Park | b1c8e16 | 2020-05-18 19:04:42 +0900 | [diff] [blame] | 59 | shared_libs: ["libz"], |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 60 | } |
| 61 | |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 62 | cc_defaults { |
| 63 | name: "libart-dexlayout_static_base_defaults", |
Martin Stjernholm | 35f765b | 2020-09-23 00:38:38 +0100 | [diff] [blame] | 64 | whole_static_libs: [ |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 65 | "libbase", |
Nicolas Geoffray | 65ed42a | 2018-10-30 12:33:04 +0000 | [diff] [blame] | 66 | "libz", |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 67 | ], |
| 68 | } |
| 69 | |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 70 | art_cc_library { |
| 71 | name: "libart-dexlayout", |
Pirama Arumuga Nainar | 42d5805 | 2018-04-18 22:59:36 -0700 | [diff] [blame] | 72 | defaults: [ |
| 73 | "libart-dexlayout-defaults", |
| 74 | "dex2oat-pgo-defaults", |
| 75 | ], |
Yi Kong | 1d894d9 | 2018-01-19 22:01:14 -0800 | [diff] [blame] | 76 | target: { |
| 77 | android: { |
| 78 | lto: { |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 79 | thin: true, |
Yi Kong | 1d894d9 | 2018-01-19 22:01:14 -0800 | [diff] [blame] | 80 | }, |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 81 | shared_libs: [ |
| 82 | "libartbase", |
| 83 | "libdexfile", |
| 84 | "libprofile", |
| 85 | ], |
| 86 | }, |
| 87 | not_windows: { |
| 88 | shared_libs: [ |
| 89 | "libartbase", |
| 90 | "libdexfile", |
| 91 | "libprofile", |
| 92 | ], |
Yi Kong | 1d894d9 | 2018-01-19 22:01:14 -0800 | [diff] [blame] | 93 | }, |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 94 | windows: { |
| 95 | enabled: true, |
| 96 | shared: { |
| 97 | enabled: false, |
| 98 | }, |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 99 | static_libs: [ |
| 100 | "libartbase", |
| 101 | "libdexfile", |
| 102 | "libprofile", |
| 103 | ], |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 104 | }, |
Yi Kong | 1d894d9 | 2018-01-19 22:01:14 -0800 | [diff] [blame] | 105 | }, |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 106 | apex_available: [ |
Martin Stjernholm | 3e9abfc | 2020-10-09 22:17:51 +0100 | [diff] [blame] | 107 | "com.android.art", |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 108 | "com.android.art.debug", |
| 109 | ], |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 110 | } |
| 111 | |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 112 | cc_defaults { |
| 113 | name: "libart-dexlayout_static_defaults", |
| 114 | defaults: [ |
| 115 | "libart-dexlayout_static_base_defaults", |
| 116 | "libartbase_static_defaults", |
| 117 | "libdexfile_static_defaults", |
| 118 | "libprofile_static_defaults", |
| 119 | ], |
Martin Stjernholm | 35f765b | 2020-09-23 00:38:38 +0100 | [diff] [blame] | 120 | whole_static_libs: ["libart-dexlayout"], |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 121 | } |
| 122 | |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 123 | art_cc_library { |
| 124 | name: "libartd-dexlayout", |
Mathieu Chartier | 5929beb | 2017-10-20 23:24:10 -0700 | [diff] [blame] | 125 | defaults: [ |
Andreas Gampe | 0dc93b1 | 2019-05-15 10:30:22 -0700 | [diff] [blame] | 126 | "libart-dexlayout-defaults", |
| 127 | "art_debug_defaults", |
Mathieu Chartier | 5929beb | 2017-10-20 23:24:10 -0700 | [diff] [blame] | 128 | ], |
David Srbecky | 7711c35 | 2019-04-10 17:50:12 +0100 | [diff] [blame] | 129 | target: { |
| 130 | android: { |
| 131 | shared_libs: [ |
| 132 | "libartbased", |
| 133 | "libdexfiled", |
| 134 | "libprofiled", |
| 135 | ], |
| 136 | }, |
| 137 | not_windows: { |
| 138 | shared_libs: [ |
| 139 | "libartbased", |
| 140 | "libdexfiled", |
| 141 | "libprofiled", |
| 142 | ], |
| 143 | }, |
| 144 | windows: { |
| 145 | static_libs: [ |
| 146 | "libartbased", |
| 147 | "libdexfiled", |
| 148 | "libprofiled", |
| 149 | ], |
| 150 | }, |
| 151 | }, |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 152 | apex_available: [ |
| 153 | "com.android.art.debug", |
Martin Stjernholm | d3e9ff3 | 2021-03-16 00:44:25 +0000 | [diff] [blame] | 154 | // TODO(b/183882457): This lib doesn't go into com.android.art, but |
| 155 | // apex_available lists need to be the same for internal libs to avoid |
| 156 | // stubs, and this depends on libdexfiled. |
| 157 | "com.android.art", |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 158 | ], |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 159 | } |
| 160 | |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 161 | cc_defaults { |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 162 | name: "libartd-dexlayout_static_defaults", |
| 163 | defaults: [ |
| 164 | "libart-dexlayout_static_base_defaults", |
| 165 | "libartbased_static_defaults", |
| 166 | "libdexfiled_static_defaults", |
| 167 | "libprofiled_static_defaults", |
| 168 | ], |
Martin Stjernholm | 35f765b | 2020-09-23 00:38:38 +0100 | [diff] [blame] | 169 | whole_static_libs: ["libartd-dexlayout"], |
Andreas Gampe | ec5ed06 | 2018-01-26 16:20:02 -0800 | [diff] [blame] | 170 | } |
| 171 | |
| 172 | cc_defaults { |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 173 | name: "dexlayout-defaults", |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 174 | defaults: ["art_defaults"], |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 175 | host_supported: true, |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 176 | shared_libs: [ |
| 177 | "libbase", |
| 178 | ], |
| 179 | } |
| 180 | |
| 181 | art_cc_binary { |
| 182 | name: "dexlayout", |
| 183 | defaults: ["dexlayout-defaults"], |
David Sehr | 671af6c | 2018-05-17 11:00:35 -0700 | [diff] [blame] | 184 | srcs: ["dexlayout_main.cc"], |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 185 | shared_libs: [ |
David Sehr | 671af6c | 2018-05-17 11:00:35 -0700 | [diff] [blame] | 186 | "libdexfile", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 187 | "libprofile", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 188 | "libartbase", |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 189 | "libart-dexlayout", |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 190 | ], |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 191 | apex_available: [ |
Martin Stjernholm | 3e9abfc | 2020-10-09 22:17:51 +0100 | [diff] [blame] | 192 | "com.android.art", |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 193 | "com.android.art.debug", |
| 194 | ], |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 195 | } |
| 196 | |
| 197 | art_cc_binary { |
David Sehr | 9d9227a | 2018-12-19 12:32:50 -0800 | [diff] [blame] | 198 | name: "dexlayouts", |
| 199 | defaults: [ |
| 200 | "dexlayout-defaults", |
| 201 | "libart-dexlayout_static_defaults", |
| 202 | "libprofile_static_defaults", |
| 203 | "libdexfile_static_defaults", |
| 204 | "libartbase_static_defaults", |
| 205 | ], |
| 206 | srcs: ["dexlayout_main.cc"], |
| 207 | host_supported: true, |
| 208 | device_supported: false, |
| 209 | target: { |
| 210 | darwin: { |
| 211 | enabled: false, |
| 212 | }, |
| 213 | windows: { |
| 214 | enabled: true, |
| 215 | cflags: ["-Wno-thread-safety"], |
| 216 | }, |
| 217 | }, |
| 218 | } |
| 219 | |
| 220 | art_cc_binary { |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 221 | name: "dexlayoutd", |
| 222 | defaults: [ |
| 223 | "art_debug_defaults", |
| 224 | "dexlayout-defaults", |
| 225 | ], |
David Sehr | 671af6c | 2018-05-17 11:00:35 -0700 | [diff] [blame] | 226 | srcs: ["dexlayout_main.cc"], |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 227 | shared_libs: [ |
David Sehr | 671af6c | 2018-05-17 11:00:35 -0700 | [diff] [blame] | 228 | "libdexfiled", |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 229 | "libprofiled", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 230 | "libartbased", |
Andreas Gampe | 693bfbf | 2017-11-10 12:23:31 -0800 | [diff] [blame] | 231 | "libartd-dexlayout", |
Andreas Gampe | 3fec9ac | 2016-09-13 10:47:28 -0700 | [diff] [blame] | 232 | ], |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 233 | apex_available: [ |
| 234 | "com.android.art.debug", |
| 235 | ], |
Colin Cross | fe6064a | 2016-08-30 13:49:26 -0700 | [diff] [blame] | 236 | } |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 237 | |
| 238 | art_cc_test { |
| 239 | name: "art_dexlayout_tests", |
Jeff Hao | ea7c629 | 2016-11-14 18:10:16 -0800 | [diff] [blame] | 240 | defaults: ["art_gtest_defaults"], |
David Sehr | 82d046e | 2018-04-23 08:14:19 -0700 | [diff] [blame] | 241 | shared_libs: [ |
| 242 | "libprofiled", |
| 243 | "libartd-dexlayout", |
| 244 | ], |
David Srbecky | 4a88a5a | 2020-05-05 16:21:57 +0100 | [diff] [blame] | 245 | data: [ |
| 246 | ":art-gtest-jars-ManyMethods", |
| 247 | ], |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 248 | srcs: ["dexlayout_test.cc"], |
Yo Chiang | 169dfb4 | 2020-08-07 04:22:18 +0000 | [diff] [blame] | 249 | target: { |
| 250 | host: { |
| 251 | required: [ |
| 252 | "dexdump", |
| 253 | "dexlayoutd", |
| 254 | ], |
| 255 | }, |
| 256 | }, |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 257 | } |
David Sehr | beca4fe | 2017-03-30 17:50:24 -0700 | [diff] [blame] | 258 | |
| 259 | art_cc_binary { |
| 260 | name: "dexdiag", |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 261 | defaults: ["art_defaults"], |
| 262 | host_supported: true, |
David Sehr | beca4fe | 2017-03-30 17:50:24 -0700 | [diff] [blame] | 263 | srcs: ["dexdiag.cc"], |
| 264 | cflags: ["-Wall"], |
| 265 | shared_libs: [ |
| 266 | "libart", |
David Sehr | 671af6c | 2018-05-17 11:00:35 -0700 | [diff] [blame] | 267 | "libdexfile", |
David Sehr | 1f01016 | 2018-05-15 08:59:32 -0700 | [diff] [blame] | 268 | "libartbase", |
David Sehr | beca4fe | 2017-03-30 17:50:24 -0700 | [diff] [blame] | 269 | "libart-dexlayout", |
Andreas Gampe | 281fee0 | 2018-03-05 12:59:30 -0800 | [diff] [blame] | 270 | "libbase", |
David Sehr | beca4fe | 2017-03-30 17:50:24 -0700 | [diff] [blame] | 271 | ], |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 272 | target: { |
| 273 | android: { |
| 274 | shared_libs: [ |
Sandeep Patil | 2110de5 | 2019-01-21 17:21:09 -0800 | [diff] [blame] | 275 | "libmeminfo", |
Dan Willemsen | 2ca2780 | 2017-09-27 14:57:43 -0700 | [diff] [blame] | 276 | ], |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 277 | }, |
Dan Willemsen | 2ca2780 | 2017-09-27 14:57:43 -0700 | [diff] [blame] | 278 | }, |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 279 | apex_available: [ |
Martin Stjernholm | 3e9abfc | 2020-10-09 22:17:51 +0100 | [diff] [blame] | 280 | "com.android.art", |
Jiyong Park | 066dd902 | 2019-12-19 02:11:59 +0000 | [diff] [blame] | 281 | "com.android.art.debug", |
| 282 | ], |
David Sehr | beca4fe | 2017-03-30 17:50:24 -0700 | [diff] [blame] | 283 | } |
| 284 | |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 285 | art_cc_test { |
| 286 | name: "art_dexdiag_tests", |
| 287 | host_supported: true, |
| 288 | defaults: [ |
| 289 | "art_gtest_defaults", |
| 290 | ], |
| 291 | srcs: ["dexdiag_test.cc"], |
Yo Chiang | 169dfb4 | 2020-08-07 04:22:18 +0000 | [diff] [blame] | 292 | target: { |
| 293 | host: { |
| 294 | required: ["dexdiag"], |
| 295 | }, |
| 296 | }, |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 297 | } |