• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15package {
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
24art_cc_defaults {
25    name: "libart-dexlayout-defaults",
26    defaults: ["art_defaults"],
27    host_supported: true,
28    srcs: [
29        "compact_dex_writer.cc",
30        "dexlayout.cc",
31        "dex_ir.cc",
32        "dex_ir_builder.cc",
33        "dex_verify.cc",
34        "dex_visualize.cc",
35        "dex_writer.cc",
36    ],
37    export_include_dirs: ["."],
38    target: {
39        android: {
40            shared_libs: [
41                "libartpalette",
42                "libbase",
43            ],
44        },
45        not_windows: {
46            shared_libs: [
47                "libartpalette",
48                "libbase",
49            ],
50        },
51        windows: {
52            cflags: ["-Wno-thread-safety"],
53            static_libs: [
54                "libartpalette",
55                "libbase",
56            ],
57        },
58    },
59    shared_libs: ["libz"],
60}
61
62cc_defaults {
63    name: "libart-dexlayout_static_base_defaults",
64    whole_static_libs: [
65        "libbase",
66        "libz",
67    ],
68}
69
70art_cc_library {
71    name: "libart-dexlayout",
72    defaults: [
73        "libart-dexlayout-defaults",
74        "dex2oat-pgo-defaults",
75    ],
76    target: {
77        android: {
78            lto: {
79                thin: true,
80            },
81            shared_libs: [
82                "libartbase",
83                "libdexfile",
84                "libprofile",
85            ],
86        },
87        not_windows: {
88            shared_libs: [
89                "libartbase",
90                "libdexfile",
91                "libprofile",
92            ],
93        },
94        windows: {
95            enabled: true,
96            shared: {
97                enabled: false,
98            },
99            static_libs: [
100                "libartbase",
101                "libdexfile",
102                "libprofile",
103            ],
104        },
105    },
106    apex_available: [
107        "com.android.art",
108        "com.android.art.debug",
109        "test_broken_com.android.art",
110    ],
111}
112
113cc_defaults {
114    name: "libart-dexlayout_static_defaults",
115    defaults: [
116        "libart-dexlayout_static_base_defaults",
117        "libartbase_static_defaults",
118        "libdexfile_static_defaults",
119        "libprofile_static_defaults",
120    ],
121    whole_static_libs: ["libart-dexlayout"],
122}
123
124art_cc_library {
125    name: "libartd-dexlayout",
126    defaults: [
127        "libart-dexlayout-defaults",
128        "art_debug_defaults",
129    ],
130    target: {
131        android: {
132            shared_libs: [
133                "libartbased",
134                "libdexfiled",
135                "libprofiled",
136            ],
137        },
138        not_windows: {
139            shared_libs: [
140                "libartbased",
141                "libdexfiled",
142                "libprofiled",
143            ],
144        },
145        windows: {
146            static_libs: [
147                "libartbased",
148                "libdexfiled",
149                "libprofiled",
150            ],
151        },
152    },
153    apex_available: [
154        "com.android.art.debug",
155        // TODO(b/183882457): This lib doesn't go into com.android.art, but
156        // apex_available lists need to be the same for internal libs to avoid
157        // stubs, and this depends on libdexfiled.
158        "com.android.art",
159    ],
160}
161
162cc_defaults {
163    name: "libartd-dexlayout_static_defaults",
164    defaults: [
165        "libart-dexlayout_static_base_defaults",
166        "libartbased_static_defaults",
167        "libdexfiled_static_defaults",
168        "libprofiled_static_defaults",
169    ],
170    whole_static_libs: ["libartd-dexlayout"],
171}
172
173cc_defaults {
174    name: "dexlayout-defaults",
175    defaults: ["art_defaults"],
176    host_supported: true,
177    shared_libs: [
178        "libbase",
179    ],
180}
181
182art_cc_binary {
183    name: "dexlayout",
184    defaults: ["dexlayout-defaults"],
185    srcs: ["dexlayout_main.cc"],
186    shared_libs: [
187        "libdexfile",
188        "libprofile",
189        "libartbase",
190        "libart-dexlayout",
191    ],
192    apex_available: [
193        "com.android.art",
194        "com.android.art.debug",
195        "test_broken_com.android.art",
196    ],
197}
198
199art_cc_binary {
200    name: "dexlayouts",
201    defaults: [
202        "dexlayout-defaults",
203        "libart-dexlayout_static_defaults",
204        "libprofile_static_defaults",
205        "libdexfile_static_defaults",
206        "libartbase_static_defaults",
207    ],
208    srcs: ["dexlayout_main.cc"],
209    host_supported: true,
210    device_supported: false,
211    target: {
212        darwin: {
213            enabled: false,
214        },
215        windows: {
216            enabled: true,
217            cflags: ["-Wno-thread-safety"],
218        },
219    },
220}
221
222art_cc_binary {
223    name: "dexlayoutd",
224    defaults: [
225        "art_debug_defaults",
226        "dexlayout-defaults",
227    ],
228    srcs: ["dexlayout_main.cc"],
229    shared_libs: [
230        "libdexfiled",
231        "libprofiled",
232        "libartbased",
233        "libartd-dexlayout",
234    ],
235    apex_available: [
236        "com.android.art.debug",
237    ],
238}
239
240art_cc_test {
241    name: "art_dexlayout_tests",
242    defaults: ["art_gtest_defaults"],
243    shared_libs: [
244        "libprofiled",
245        "libartd-dexlayout",
246    ],
247    data: [
248        ":art-gtest-jars-ManyMethods",
249    ],
250    srcs: ["dexlayout_test.cc"],
251    target: {
252        host: {
253            required: [
254                "dexdump",
255                "dexlayoutd",
256            ],
257        },
258    },
259}
260
261art_cc_binary {
262    name: "dexdiag",
263    defaults: ["art_defaults"],
264    host_supported: true,
265    srcs: ["dexdiag.cc"],
266    cflags: ["-Wall"],
267    shared_libs: [
268        "libart",
269        "libdexfile",
270        "libartbase",
271        "libart-dexlayout",
272        "libbase",
273    ],
274    target: {
275        android: {
276            shared_libs: [
277                "libmeminfo",
278            ],
279        },
280    },
281    apex_available: [
282        "com.android.art",
283        "com.android.art.debug",
284    ],
285}
286
287art_cc_test {
288    name: "art_dexdiag_tests",
289    host_supported: true,
290    defaults: [
291        "art_gtest_defaults",
292    ],
293    srcs: ["dexdiag_test.cc"],
294    target: {
295        host: {
296            required: ["dexdiag"],
297        },
298    },
299}
300