blob: 922e1346b81875fa8dd76bdbb9dfdae6984a6411 [file] [log] [blame]
Colin Crossfe6064a2016-08-30 13:49:26 -07001// 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 Badour9150de62021-02-26 03:22:24 -080015package {
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 Haoea7c6292016-11-14 18:10:16 -080024art_cc_defaults {
25 name: "libart-dexlayout-defaults",
David Sehr7639cdc2017-04-15 10:06:21 -070026 defaults: ["art_defaults"],
Colin Crossfe6064a2016-08-30 13:49:26 -070027 host_supported: true,
28 srcs: [
Mathieu Chartierf95a75e2017-11-03 15:25:52 -070029 "compact_dex_writer.cc",
Colin Crossfe6064a2016-08-30 13:49:26 -070030 "dexlayout.cc",
Jeff Hao3ab96b42016-09-09 18:35:01 -070031 "dex_ir.cc",
Colin Crossfe6064a2016-08-30 13:49:26 -070032 "dex_ir_builder.cc",
David Sehr55232f12017-04-19 14:06:49 -070033 "dex_verify.cc",
David Sehrcdcfde72016-09-26 07:44:04 -070034 "dex_visualize.cc",
Jeff Haoa8621002016-10-04 18:13:44 +000035 "dex_writer.cc",
Colin Crossfe6064a2016-08-30 13:49:26 -070036 ],
Jeff Haoea7c6292016-11-14 18:10:16 -080037 export_include_dirs: ["."],
David Sehr9d9227a2018-12-19 12:32:50 -080038 target: {
39 android: {
40 shared_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000041 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080042 "libbase",
43 ],
44 },
45 not_windows: {
46 shared_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000047 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080048 "libbase",
49 ],
50 },
51 windows: {
52 cflags: ["-Wno-thread-safety"],
53 static_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000054 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080055 "libbase",
56 ],
57 },
58 },
Jiyong Parkb1c8e162020-05-18 19:04:42 +090059 shared_libs: ["libz"],
Jeff Haoea7c6292016-11-14 18:10:16 -080060}
61
Andreas Gampeec5ed062018-01-26 16:20:02 -080062cc_defaults {
63 name: "libart-dexlayout_static_base_defaults",
Martin Stjernholm35f765b2020-09-23 00:38:38 +010064 whole_static_libs: [
Andreas Gampeec5ed062018-01-26 16:20:02 -080065 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000066 "libz",
Andreas Gampeec5ed062018-01-26 16:20:02 -080067 ],
68}
69
Jeff Haoea7c6292016-11-14 18:10:16 -080070art_cc_library {
71 name: "libart-dexlayout",
Pirama Arumuga Nainar42d58052018-04-18 22:59:36 -070072 defaults: [
73 "libart-dexlayout-defaults",
74 "dex2oat-pgo-defaults",
75 ],
Yi Kong1d894d92018-01-19 22:01:14 -080076 target: {
77 android: {
78 lto: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -070079 thin: true,
Yi Kong1d894d92018-01-19 22:01:14 -080080 },
David Srbecky7711c352019-04-10 17:50:12 +010081 shared_libs: [
82 "libartbase",
83 "libdexfile",
84 "libprofile",
85 ],
86 },
87 not_windows: {
88 shared_libs: [
89 "libartbase",
90 "libdexfile",
91 "libprofile",
92 ],
Yi Kong1d894d92018-01-19 22:01:14 -080093 },
David Sehr9d9227a2018-12-19 12:32:50 -080094 windows: {
95 enabled: true,
96 shared: {
97 enabled: false,
98 },
David Srbecky7711c352019-04-10 17:50:12 +010099 static_libs: [
100 "libartbase",
101 "libdexfile",
102 "libprofile",
103 ],
David Sehr9d9227a2018-12-19 12:32:50 -0800104 },
Yi Kong1d894d92018-01-19 22:01:14 -0800105 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000106 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +0100107 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +0000108 "com.android.art.debug",
109 ],
Jeff Haoea7c6292016-11-14 18:10:16 -0800110}
111
Andreas Gampeec5ed062018-01-26 16:20:02 -0800112cc_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 Stjernholm35f765b2020-09-23 00:38:38 +0100120 whole_static_libs: ["libart-dexlayout"],
Andreas Gampeec5ed062018-01-26 16:20:02 -0800121}
122
Jeff Haoea7c6292016-11-14 18:10:16 -0800123art_cc_library {
124 name: "libartd-dexlayout",
Mathieu Chartier5929beb2017-10-20 23:24:10 -0700125 defaults: [
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700126 "libart-dexlayout-defaults",
127 "art_debug_defaults",
Mathieu Chartier5929beb2017-10-20 23:24:10 -0700128 ],
David Srbecky7711c352019-04-10 17:50:12 +0100129 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 Park066dd9022019-12-19 02:11:59 +0000152 apex_available: [
153 "com.android.art.debug",
Martin Stjernholmd3e9ff32021-03-16 00:44:25 +0000154 // 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 Park066dd9022019-12-19 02:11:59 +0000158 ],
Jeff Haoea7c6292016-11-14 18:10:16 -0800159}
160
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800161cc_defaults {
Andreas Gampeec5ed062018-01-26 16:20:02 -0800162 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 Stjernholm35f765b2020-09-23 00:38:38 +0100169 whole_static_libs: ["libartd-dexlayout"],
Andreas Gampeec5ed062018-01-26 16:20:02 -0800170}
171
172cc_defaults {
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800173 name: "dexlayout-defaults",
David Sehr55232f12017-04-19 14:06:49 -0700174 defaults: ["art_defaults"],
Jeff Haoea7c6292016-11-14 18:10:16 -0800175 host_supported: true,
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800176 shared_libs: [
177 "libbase",
178 ],
179}
180
181art_cc_binary {
182 name: "dexlayout",
183 defaults: ["dexlayout-defaults"],
David Sehr671af6c2018-05-17 11:00:35 -0700184 srcs: ["dexlayout_main.cc"],
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700185 shared_libs: [
David Sehr671af6c2018-05-17 11:00:35 -0700186 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -0700187 "libprofile",
David Sehr1f010162018-05-15 08:59:32 -0700188 "libartbase",
Jeff Haoea7c6292016-11-14 18:10:16 -0800189 "libart-dexlayout",
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800190 ],
Jiyong Park066dd9022019-12-19 02:11:59 +0000191 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +0100192 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +0000193 "com.android.art.debug",
194 ],
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800195}
196
197art_cc_binary {
David Sehr9d9227a2018-12-19 12:32:50 -0800198 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
220art_cc_binary {
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800221 name: "dexlayoutd",
222 defaults: [
223 "art_debug_defaults",
224 "dexlayout-defaults",
225 ],
David Sehr671af6c2018-05-17 11:00:35 -0700226 srcs: ["dexlayout_main.cc"],
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800227 shared_libs: [
David Sehr671af6c2018-05-17 11:00:35 -0700228 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700229 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700230 "libartbased",
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800231 "libartd-dexlayout",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700232 ],
Jiyong Park066dd9022019-12-19 02:11:59 +0000233 apex_available: [
234 "com.android.art.debug",
235 ],
Colin Crossfe6064a2016-08-30 13:49:26 -0700236}
Colin Cross6e95dd52016-09-12 15:37:10 -0700237
238art_cc_test {
239 name: "art_dexlayout_tests",
Jeff Haoea7c6292016-11-14 18:10:16 -0800240 defaults: ["art_gtest_defaults"],
David Sehr82d046e2018-04-23 08:14:19 -0700241 shared_libs: [
242 "libprofiled",
243 "libartd-dexlayout",
244 ],
David Srbecky4a88a5a2020-05-05 16:21:57 +0100245 data: [
246 ":art-gtest-jars-ManyMethods",
247 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700248 srcs: ["dexlayout_test.cc"],
Yo Chiang169dfb42020-08-07 04:22:18 +0000249 target: {
250 host: {
251 required: [
252 "dexdump",
253 "dexlayoutd",
254 ],
255 },
256 },
Colin Cross6e95dd52016-09-12 15:37:10 -0700257}
David Sehrbeca4fe2017-03-30 17:50:24 -0700258
259art_cc_binary {
260 name: "dexdiag",
David Sehr55232f12017-04-19 14:06:49 -0700261 defaults: ["art_defaults"],
262 host_supported: true,
David Sehrbeca4fe2017-03-30 17:50:24 -0700263 srcs: ["dexdiag.cc"],
264 cflags: ["-Wall"],
265 shared_libs: [
266 "libart",
David Sehr671af6c2018-05-17 11:00:35 -0700267 "libdexfile",
David Sehr1f010162018-05-15 08:59:32 -0700268 "libartbase",
David Sehrbeca4fe2017-03-30 17:50:24 -0700269 "libart-dexlayout",
Andreas Gampe281fee02018-03-05 12:59:30 -0800270 "libbase",
David Sehrbeca4fe2017-03-30 17:50:24 -0700271 ],
David Sehr55232f12017-04-19 14:06:49 -0700272 target: {
273 android: {
274 shared_libs: [
Sandeep Patil2110de52019-01-21 17:21:09 -0800275 "libmeminfo",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700276 ],
David Sehr55232f12017-04-19 14:06:49 -0700277 },
Dan Willemsen2ca27802017-09-27 14:57:43 -0700278 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000279 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +0100280 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +0000281 "com.android.art.debug",
282 ],
David Sehrbeca4fe2017-03-30 17:50:24 -0700283}
284
David Sehr55232f12017-04-19 14:06:49 -0700285art_cc_test {
286 name: "art_dexdiag_tests",
287 host_supported: true,
288 defaults: [
289 "art_gtest_defaults",
290 ],
291 srcs: ["dexdiag_test.cc"],
Yo Chiang169dfb42020-08-07 04:22:18 +0000292 target: {
293 host: {
294 required: ["dexdiag"],
295 },
296 },
David Sehr55232f12017-04-19 14:06:49 -0700297}