blob: bea61d0c71d3efdb2ec91cc0d9e5a41c9115502e [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 Sehr0225f8e2018-01-31 08:52:24 +000029 shared_libs: [
David Sehr0225f8e2018-01-31 08:52:24 +000030 "libbase",
31 ],
Jeff Haoea7c6292016-11-14 18:10:16 -080032 static_libs: ["libz"],
33}
34
35art_cc_library {
36 name: "libart-dexlayout",
37 defaults: ["libart-dexlayout-defaults"],
David Sehrfcbe15c2018-02-15 09:41:13 -080038 shared_libs: [
39 "libart",
40 "libdexfile",
41 ],
Pirama Arumuga Nainar02f6ed62018-01-04 10:52:42 -080042
43 pgo: {
44 instrumentation: true,
Pirama Arumuga Nainarc89013c2018-01-18 12:35:40 -080045 profile_file: "art/dex2oat.profdata",
Pirama Arumuga Nainar02f6ed62018-01-04 10:52:42 -080046 benchmarks: ["dex2oat"],
Pirama Arumuga Nainar02f6ed62018-01-04 10:52:42 -080047 }
Jeff Haoea7c6292016-11-14 18:10:16 -080048}
49
50art_cc_library {
51 name: "libartd-dexlayout",
Mathieu Chartier5929beb2017-10-20 23:24:10 -070052 defaults: [
53 "libart-dexlayout-defaults",
54 "art_debug_defaults",
55 ],
David Sehrfcbe15c2018-02-15 09:41:13 -080056 shared_libs: [
57 "libartd",
58 "libdexfiled",
59 ],
Jeff Haoea7c6292016-11-14 18:10:16 -080060}
61
Andreas Gampe693bfbf2017-11-10 12:23:31 -080062cc_defaults {
63 name: "dexlayout-defaults",
David Sehr55232f12017-04-19 14:06:49 -070064 defaults: ["art_defaults"],
Jeff Haoea7c6292016-11-14 18:10:16 -080065 host_supported: true,
66 srcs: ["dexlayout_main.cc"],
Andreas Gampe693bfbf2017-11-10 12:23:31 -080067 shared_libs: [
68 "libbase",
69 ],
70}
71
72art_cc_binary {
73 name: "dexlayout",
74 defaults: ["dexlayout-defaults"],
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070075 shared_libs: [
76 "libart",
Jeff Haoea7c6292016-11-14 18:10:16 -080077 "libart-dexlayout",
Andreas Gampe693bfbf2017-11-10 12:23:31 -080078 ],
79}
80
81art_cc_binary {
82 name: "dexlayoutd",
83 defaults: [
84 "art_debug_defaults",
85 "dexlayout-defaults",
86 ],
87 shared_libs: [
88 "libartd",
89 "libartd-dexlayout",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070090 ],
Colin Crossfe6064a2016-08-30 13:49:26 -070091}
Colin Cross6e95dd52016-09-12 15:37:10 -070092
93art_cc_test {
94 name: "art_dexlayout_tests",
Jeff Haoea7c6292016-11-14 18:10:16 -080095 defaults: ["art_gtest_defaults"],
Mathieu Chartier75175552018-01-25 11:23:01 -080096 shared_libs: ["libart-dexlayout"],
Colin Cross6e95dd52016-09-12 15:37:10 -070097 srcs: ["dexlayout_test.cc"],
98}
David Sehrbeca4fe2017-03-30 17:50:24 -070099
100art_cc_binary {
101 name: "dexdiag",
David Sehr55232f12017-04-19 14:06:49 -0700102 defaults: ["art_defaults"],
103 host_supported: true,
David Sehrbeca4fe2017-03-30 17:50:24 -0700104 srcs: ["dexdiag.cc"],
105 cflags: ["-Wall"],
106 shared_libs: [
107 "libart",
108 "libart-dexlayout",
David Sehrbeca4fe2017-03-30 17:50:24 -0700109 ],
David Sehr55232f12017-04-19 14:06:49 -0700110 target: {
111 android: {
112 shared_libs: [
113 "libpagemap",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700114 ],
David Sehr55232f12017-04-19 14:06:49 -0700115 },
Dan Willemsen2ca27802017-09-27 14:57:43 -0700116 },
David Sehrbeca4fe2017-03-30 17:50:24 -0700117}
118
David Sehr55232f12017-04-19 14:06:49 -0700119art_cc_test {
120 name: "art_dexdiag_tests",
121 host_supported: true,
122 defaults: [
123 "art_gtest_defaults",
124 ],
125 srcs: ["dexdiag_test.cc"],
126}