blob: 65bb92cdd830fe89a642a2078187592d509324e0 [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
Jeff Haoea7c6292016-11-14 18:10:16 -080015art_cc_defaults {
16 name: "libart-dexlayout-defaults",
David Sehr7639cdc2017-04-15 10:06:21 -070017 defaults: ["art_defaults"],
Colin Crossfe6064a2016-08-30 13:49:26 -070018 host_supported: true,
19 srcs: [
Mathieu Chartierf95a75e2017-11-03 15:25:52 -070020 "compact_dex_writer.cc",
Colin Crossfe6064a2016-08-30 13:49:26 -070021 "dexlayout.cc",
Jeff Hao3ab96b42016-09-09 18:35:01 -070022 "dex_ir.cc",
Colin Crossfe6064a2016-08-30 13:49:26 -070023 "dex_ir_builder.cc",
David Sehr55232f12017-04-19 14:06:49 -070024 "dex_verify.cc",
David Sehrcdcfde72016-09-26 07:44:04 -070025 "dex_visualize.cc",
Jeff Haoa8621002016-10-04 18:13:44 +000026 "dex_writer.cc",
Colin Crossfe6064a2016-08-30 13:49:26 -070027 ],
Jeff Haoea7c6292016-11-14 18:10:16 -080028 export_include_dirs: ["."],
David Sehr9d9227a2018-12-19 12:32:50 -080029 target: {
30 android: {
31 shared_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000032 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080033 "libbase",
34 ],
35 },
36 not_windows: {
37 shared_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000038 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080039 "libbase",
40 ],
41 },
42 windows: {
43 cflags: ["-Wno-thread-safety"],
44 static_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000045 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080046 "libbase",
47 ],
48 },
49 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000050 static_libs: ["libz"],
Jeff Haoea7c6292016-11-14 18:10:16 -080051}
52
Andreas Gampeec5ed062018-01-26 16:20:02 -080053cc_defaults {
54 name: "libart-dexlayout_static_base_defaults",
55 static_libs: [
56 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000057 "libz",
Andreas Gampeec5ed062018-01-26 16:20:02 -080058 ],
59}
60
Jeff Haoea7c6292016-11-14 18:10:16 -080061art_cc_library {
62 name: "libart-dexlayout",
Pirama Arumuga Nainar42d58052018-04-18 22:59:36 -070063 defaults: [
64 "libart-dexlayout-defaults",
65 "dex2oat-pgo-defaults",
66 ],
Yi Kong1d894d92018-01-19 22:01:14 -080067 target: {
68 android: {
69 lto: {
Andreas Gampe0dc93b12019-05-15 10:30:22 -070070 thin: true,
Yi Kong1d894d92018-01-19 22:01:14 -080071 },
David Srbecky7711c352019-04-10 17:50:12 +010072 shared_libs: [
73 "libartbase",
74 "libdexfile",
75 "libprofile",
76 ],
77 },
78 not_windows: {
79 shared_libs: [
80 "libartbase",
81 "libdexfile",
82 "libprofile",
83 ],
Yi Kong1d894d92018-01-19 22:01:14 -080084 },
David Sehr9d9227a2018-12-19 12:32:50 -080085 windows: {
86 enabled: true,
87 shared: {
88 enabled: false,
89 },
David Srbecky7711c352019-04-10 17:50:12 +010090 static_libs: [
91 "libartbase",
92 "libdexfile",
93 "libprofile",
94 ],
David Sehr9d9227a2018-12-19 12:32:50 -080095 },
Yi Kong1d894d92018-01-19 22:01:14 -080096 },
Jeff Haoea7c6292016-11-14 18:10:16 -080097}
98
Andreas Gampeec5ed062018-01-26 16:20:02 -080099cc_defaults {
100 name: "libart-dexlayout_static_defaults",
101 defaults: [
102 "libart-dexlayout_static_base_defaults",
103 "libartbase_static_defaults",
104 "libdexfile_static_defaults",
105 "libprofile_static_defaults",
106 ],
107 static_libs: ["libart-dexlayout"],
108}
109
Jeff Haoea7c6292016-11-14 18:10:16 -0800110art_cc_library {
111 name: "libartd-dexlayout",
Mathieu Chartier5929beb2017-10-20 23:24:10 -0700112 defaults: [
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700113 "libart-dexlayout-defaults",
114 "art_debug_defaults",
Mathieu Chartier5929beb2017-10-20 23:24:10 -0700115 ],
David Srbecky7711c352019-04-10 17:50:12 +0100116 target: {
117 android: {
118 shared_libs: [
119 "libartbased",
120 "libdexfiled",
121 "libprofiled",
122 ],
123 },
124 not_windows: {
125 shared_libs: [
126 "libartbased",
127 "libdexfiled",
128 "libprofiled",
129 ],
130 },
131 windows: {
132 static_libs: [
133 "libartbased",
134 "libdexfiled",
135 "libprofiled",
136 ],
137 },
138 },
Jeff Haoea7c6292016-11-14 18:10:16 -0800139}
140
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800141cc_defaults {
Andreas Gampeec5ed062018-01-26 16:20:02 -0800142 name: "libartd-dexlayout_static_defaults",
143 defaults: [
144 "libart-dexlayout_static_base_defaults",
145 "libartbased_static_defaults",
146 "libdexfiled_static_defaults",
147 "libprofiled_static_defaults",
148 ],
149 static_libs: ["libartd-dexlayout"],
150}
151
152cc_defaults {
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800153 name: "dexlayout-defaults",
David Sehr55232f12017-04-19 14:06:49 -0700154 defaults: ["art_defaults"],
Jeff Haoea7c6292016-11-14 18:10:16 -0800155 host_supported: true,
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800156 shared_libs: [
157 "libbase",
158 ],
159}
160
161art_cc_binary {
162 name: "dexlayout",
163 defaults: ["dexlayout-defaults"],
David Sehr671af6c2018-05-17 11:00:35 -0700164 srcs: ["dexlayout_main.cc"],
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700165 shared_libs: [
David Sehr671af6c2018-05-17 11:00:35 -0700166 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -0700167 "libprofile",
David Sehr1f010162018-05-15 08:59:32 -0700168 "libartbase",
Jeff Haoea7c6292016-11-14 18:10:16 -0800169 "libart-dexlayout",
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800170 ],
171}
172
173art_cc_binary {
David Sehr9d9227a2018-12-19 12:32:50 -0800174 name: "dexlayouts",
175 defaults: [
176 "dexlayout-defaults",
177 "libart-dexlayout_static_defaults",
178 "libprofile_static_defaults",
179 "libdexfile_static_defaults",
180 "libartbase_static_defaults",
181 ],
182 srcs: ["dexlayout_main.cc"],
183 host_supported: true,
184 device_supported: false,
185 target: {
186 darwin: {
187 enabled: false,
188 },
189 windows: {
190 enabled: true,
191 cflags: ["-Wno-thread-safety"],
192 },
193 },
194}
195
196art_cc_binary {
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800197 name: "dexlayoutd",
198 defaults: [
199 "art_debug_defaults",
200 "dexlayout-defaults",
201 ],
David Sehr671af6c2018-05-17 11:00:35 -0700202 srcs: ["dexlayout_main.cc"],
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800203 shared_libs: [
David Sehr671af6c2018-05-17 11:00:35 -0700204 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700205 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700206 "libartbased",
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800207 "libartd-dexlayout",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700208 ],
Colin Crossfe6064a2016-08-30 13:49:26 -0700209}
Colin Cross6e95dd52016-09-12 15:37:10 -0700210
211art_cc_test {
212 name: "art_dexlayout_tests",
Jeff Haoea7c6292016-11-14 18:10:16 -0800213 defaults: ["art_gtest_defaults"],
David Sehr82d046e2018-04-23 08:14:19 -0700214 shared_libs: [
215 "libprofiled",
216 "libartd-dexlayout",
217 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700218 srcs: ["dexlayout_test.cc"],
219}
David Sehrbeca4fe2017-03-30 17:50:24 -0700220
221art_cc_binary {
222 name: "dexdiag",
David Sehr55232f12017-04-19 14:06:49 -0700223 defaults: ["art_defaults"],
224 host_supported: true,
David Sehrbeca4fe2017-03-30 17:50:24 -0700225 srcs: ["dexdiag.cc"],
226 cflags: ["-Wall"],
227 shared_libs: [
228 "libart",
David Sehr671af6c2018-05-17 11:00:35 -0700229 "libdexfile",
David Sehr1f010162018-05-15 08:59:32 -0700230 "libartbase",
David Sehrbeca4fe2017-03-30 17:50:24 -0700231 "libart-dexlayout",
Andreas Gampe281fee02018-03-05 12:59:30 -0800232 "libbase",
David Sehrbeca4fe2017-03-30 17:50:24 -0700233 ],
David Sehr55232f12017-04-19 14:06:49 -0700234 target: {
235 android: {
236 shared_libs: [
Sandeep Patil2110de52019-01-21 17:21:09 -0800237 "libmeminfo",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700238 ],
David Sehr55232f12017-04-19 14:06:49 -0700239 },
Dan Willemsen2ca27802017-09-27 14:57:43 -0700240 },
David Sehrbeca4fe2017-03-30 17:50:24 -0700241}
242
David Sehr55232f12017-04-19 14:06:49 -0700243art_cc_test {
244 name: "art_dexdiag_tests",
245 host_supported: true,
246 defaults: [
247 "art_gtest_defaults",
248 ],
249 srcs: ["dexdiag_test.cc"],
250}