blob: 346f5a7ef54e943f8fc8c7c3bd51d673c02c7d2f [file] [log] [blame]
Colin Crossc7376e02016-09-08 12:52:18 -07001//
2// Copyright (C) 2011 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
Andreas Gampe7b565912017-03-20 15:48:52 -070017cc_library_headers {
18 name: "dex2oat_headers",
19 host_supported: true,
20 export_include_dirs: ["include"],
21}
22
Colin Crossc7376e02016-09-08 12:52:18 -070023cc_defaults {
24 name: "dex2oat-defaults",
25 host_supported: true,
26 defaults: ["art_defaults"],
27 srcs: ["dex2oat.cc"],
28
29 target: {
30 android: {
31 // Use the 32-bit version of dex2oat on devices
32 compile_multilib: "prefer32",
33
34 sanitize: {
35 // ASan slows down dex2oat by ~3.5x, which translates into
36 // extremely slow first boot. Disabled to help speed up
37 // SANITIZE_TARGET mode.
38 // Bug: 22233158
39 address: false,
Vishwath Mohan07407cd2016-09-29 15:05:51 -070040 coverage: false,
Colin Crossc7376e02016-09-08 12:52:18 -070041 },
42 },
Colin Crossc7376e02016-09-08 12:52:18 -070043 },
44
45
46 include_dirs: [
47 "art/cmdline",
48 ],
Andreas Gampe7b565912017-03-20 15:48:52 -070049 header_libs: ["dex2oat_headers"],
Colin Crossc7376e02016-09-08 12:52:18 -070050}
51
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010052art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070053 name: "dex2oat",
54 defaults: [
55 "dex2oat-defaults",
56 ],
57 shared_libs: [
58 "libart",
59 "libart-compiler",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070060 "libbase",
Colin Crossc7376e02016-09-08 12:52:18 -070061 "libsigchain",
62 ],
63}
64
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010065art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070066 name: "dex2oatd",
67 defaults: [
68 "art_debug_defaults",
69 "dex2oat-defaults",
70 ],
71 shared_libs: [
72 "libartd",
73 "libartd-compiler",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070074 "libbase",
Colin Crossc7376e02016-09-08 12:52:18 -070075 "libsigchain",
76 ],
77}
78
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010079art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070080 name: "dex2oats",
81 device_supported: false,
82 static_executable: true,
83 defaults: ["dex2oat-defaults"],
Colin Crossaa63aa22016-09-13 14:07:00 -070084 target: {
85 darwin: {
86 enabled: false,
87 },
88 },
Colin Cross2cfc4ba2016-09-13 16:55:55 -070089 ldflags: [
90 // We need this because GC stress mode makes use of
91 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
92 // defined in libgcc_eh.a(unwind-dw2.o)
93 // TODO: Having this is not ideal as it might obscure errors.
94 // Try to get rid of it.
95 "-z muldefs",
96 ],
Colin Crossc7376e02016-09-08 12:52:18 -070097 static_libs: [
98 "libart-compiler",
Jeff Hao608f2ce2016-10-19 11:17:11 -070099 "libart-dexlayout",
Colin Crossc7376e02016-09-08 12:52:18 -0700100 "libart",
101 "libvixl-arm",
102 "libvixl-arm64",
103 ] + art_static_dependencies,
104}
105
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +0100106art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -0700107 name: "dex2oatds",
108 device_supported: false,
109 static_executable: true,
110 defaults: [
111 "art_debug_defaults",
112 "dex2oat-defaults",
113 ],
Colin Crossaa63aa22016-09-13 14:07:00 -0700114 target: {
115 darwin: {
116 enabled: false,
117 },
118 },
Colin Cross2cfc4ba2016-09-13 16:55:55 -0700119 ldflags: [
120 // We need this because GC stress mode makes use of
121 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
122 // defined in libgcc_eh.a(unwind-dw2.o)
123 // TODO: Having this is not ideal as it might obscure errors.
124 // Try to get rid of it.
125 "-z muldefs",
126 ],
Colin Crossc7376e02016-09-08 12:52:18 -0700127 static_libs: [
128 "libartd-compiler",
Jeff Hao608f2ce2016-10-19 11:17:11 -0700129 "libartd-dexlayout",
Colin Crossc7376e02016-09-08 12:52:18 -0700130 "libartd",
131 "libvixld-arm",
132 "libvixld-arm64",
133 ] + art_static_dependencies,
134}
Colin Cross6e95dd52016-09-12 15:37:10 -0700135
136art_cc_test {
137 name: "art_dex2oat_tests",
138 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700139 "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -0700140 ],
Mathieu Chartierf70fe3d2017-06-21 15:24:02 -0700141 srcs: [
142 "dex2oat_test.cc",
143 "dex2oat_image_test.cc",
144 ],
Andreas Gampef7882972017-03-20 16:35:24 -0700145 header_libs: ["dex2oat_headers"],
Colin Cross6e95dd52016-09-12 15:37:10 -0700146}