blob: 838510be37f86abbdb2c9291ea3d802128b43a9c [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 Hodsone6e01a02019-01-30 14:02:30 +000032 "libartbase",
Orion Hodson119733d2019-01-30 15:14:41 +000033 "libartpalette",
34 "libdexfile",
David Sehr9d9227a2018-12-19 12:32:50 -080035 "libprofile",
36 "libbase",
37 ],
38 },
39 not_windows: {
40 shared_libs: [
Orion Hodsone6e01a02019-01-30 14:02:30 +000041 "libartbase",
Orion Hodson119733d2019-01-30 15:14:41 +000042 "libartpalette",
43 "libdexfile",
David Sehr9d9227a2018-12-19 12:32:50 -080044 "libprofile",
45 "libbase",
46 ],
47 },
48 windows: {
49 cflags: ["-Wno-thread-safety"],
50 static_libs: [
Orion Hodsone6e01a02019-01-30 14:02:30 +000051 "libartbase",
Orion Hodson119733d2019-01-30 15:14:41 +000052 "libartpalette",
53 "libdexfile",
David Sehr9d9227a2018-12-19 12:32:50 -080054 "libprofile",
55 "libbase",
56 ],
57 },
58 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000059 static_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",
64 static_libs: [
65 "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: {
79 thin: true,
80 },
81 },
David Sehr9d9227a2018-12-19 12:32:50 -080082 windows: {
83 enabled: true,
84 shared: {
85 enabled: false,
86 },
87 },
Yi Kong1d894d92018-01-19 22:01:14 -080088 },
Jeff Haoea7c6292016-11-14 18:10:16 -080089}
90
Andreas Gampeec5ed062018-01-26 16:20:02 -080091cc_defaults {
92 name: "libart-dexlayout_static_defaults",
93 defaults: [
94 "libart-dexlayout_static_base_defaults",
95 "libartbase_static_defaults",
96 "libdexfile_static_defaults",
97 "libprofile_static_defaults",
98 ],
99 static_libs: ["libart-dexlayout"],
100}
101
Jeff Haoea7c6292016-11-14 18:10:16 -0800102art_cc_library {
103 name: "libartd-dexlayout",
Mathieu Chartier5929beb2017-10-20 23:24:10 -0700104 defaults: [
105 "libart-dexlayout-defaults",
106 "art_debug_defaults",
107 ],
David Sehrfcbe15c2018-02-15 09:41:13 -0800108 shared_libs: [
David Sehrfcbe15c2018-02-15 09:41:13 -0800109 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -0700110 "libartbased",
David Sehr82d046e2018-04-23 08:14:19 -0700111 "libprofiled",
David Sehrfcbe15c2018-02-15 09:41:13 -0800112 ],
Jeff Haoea7c6292016-11-14 18:10:16 -0800113}
114
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800115cc_defaults {
Andreas Gampeec5ed062018-01-26 16:20:02 -0800116 name: "libartd-dexlayout_static_defaults",
117 defaults: [
118 "libart-dexlayout_static_base_defaults",
119 "libartbased_static_defaults",
120 "libdexfiled_static_defaults",
121 "libprofiled_static_defaults",
122 ],
123 static_libs: ["libartd-dexlayout"],
124}
125
126cc_defaults {
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800127 name: "dexlayout-defaults",
David Sehr55232f12017-04-19 14:06:49 -0700128 defaults: ["art_defaults"],
Jeff Haoea7c6292016-11-14 18:10:16 -0800129 host_supported: true,
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800130 shared_libs: [
131 "libbase",
132 ],
133}
134
135art_cc_binary {
136 name: "dexlayout",
137 defaults: ["dexlayout-defaults"],
David Sehr671af6c2018-05-17 11:00:35 -0700138 srcs: ["dexlayout_main.cc"],
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700139 shared_libs: [
David Sehr671af6c2018-05-17 11:00:35 -0700140 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -0700141 "libprofile",
David Sehr1f010162018-05-15 08:59:32 -0700142 "libartbase",
Jeff Haoea7c6292016-11-14 18:10:16 -0800143 "libart-dexlayout",
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800144 ],
145}
146
147art_cc_binary {
David Sehr9d9227a2018-12-19 12:32:50 -0800148 name: "dexlayouts",
149 defaults: [
150 "dexlayout-defaults",
151 "libart-dexlayout_static_defaults",
152 "libprofile_static_defaults",
153 "libdexfile_static_defaults",
154 "libartbase_static_defaults",
155 ],
156 srcs: ["dexlayout_main.cc"],
157 host_supported: true,
158 device_supported: false,
159 target: {
160 darwin: {
161 enabled: false,
162 },
163 windows: {
164 enabled: true,
165 cflags: ["-Wno-thread-safety"],
166 },
167 },
168}
169
170art_cc_binary {
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800171 name: "dexlayoutd",
172 defaults: [
173 "art_debug_defaults",
174 "dexlayout-defaults",
175 ],
David Sehr671af6c2018-05-17 11:00:35 -0700176 srcs: ["dexlayout_main.cc"],
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800177 shared_libs: [
David Sehr671af6c2018-05-17 11:00:35 -0700178 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700179 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700180 "libartbased",
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800181 "libartd-dexlayout",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700182 ],
Colin Crossfe6064a2016-08-30 13:49:26 -0700183}
Colin Cross6e95dd52016-09-12 15:37:10 -0700184
185art_cc_test {
186 name: "art_dexlayout_tests",
Jeff Haoea7c6292016-11-14 18:10:16 -0800187 defaults: ["art_gtest_defaults"],
David Sehr82d046e2018-04-23 08:14:19 -0700188 shared_libs: [
189 "libprofiled",
190 "libartd-dexlayout",
191 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700192 srcs: ["dexlayout_test.cc"],
193}
David Sehrbeca4fe2017-03-30 17:50:24 -0700194
195art_cc_binary {
196 name: "dexdiag",
David Sehr55232f12017-04-19 14:06:49 -0700197 defaults: ["art_defaults"],
198 host_supported: true,
David Sehrbeca4fe2017-03-30 17:50:24 -0700199 srcs: ["dexdiag.cc"],
200 cflags: ["-Wall"],
201 shared_libs: [
202 "libart",
David Sehr671af6c2018-05-17 11:00:35 -0700203 "libdexfile",
David Sehr1f010162018-05-15 08:59:32 -0700204 "libartbase",
David Sehrbeca4fe2017-03-30 17:50:24 -0700205 "libart-dexlayout",
Andreas Gampe281fee02018-03-05 12:59:30 -0800206 "libbase",
David Sehrbeca4fe2017-03-30 17:50:24 -0700207 ],
David Sehr55232f12017-04-19 14:06:49 -0700208 target: {
209 android: {
210 shared_libs: [
Sandeep Patil2110de52019-01-21 17:21:09 -0800211 "libmeminfo",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700212 ],
David Sehr55232f12017-04-19 14:06:49 -0700213 },
Dan Willemsen2ca27802017-09-27 14:57:43 -0700214 },
David Sehrbeca4fe2017-03-30 17:50:24 -0700215}
216
David Sehr55232f12017-04-19 14:06:49 -0700217art_cc_test {
218 name: "art_dexdiag_tests",
219 host_supported: true,
220 defaults: [
221 "art_gtest_defaults",
222 ],
223 srcs: ["dexdiag_test.cc"],
224}