blob: 11c18b092475c2d07b55beebe225f134ca306648 [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
17cc_defaults {
18 name: "dex2oat-defaults",
19 host_supported: true,
20 defaults: ["art_defaults"],
21 srcs: ["dex2oat.cc"],
22
23 target: {
24 android: {
25 // Use the 32-bit version of dex2oat on devices
26 compile_multilib: "prefer32",
27
28 sanitize: {
29 // ASan slows down dex2oat by ~3.5x, which translates into
30 // extremely slow first boot. Disabled to help speed up
31 // SANITIZE_TARGET mode.
32 // Bug: 22233158
33 address: false,
34 },
35 },
Colin Crossc7376e02016-09-08 12:52:18 -070036 },
37
38
39 include_dirs: [
40 "art/cmdline",
41 ],
42}
43
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010044art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070045 name: "dex2oat",
46 defaults: [
47 "dex2oat-defaults",
48 ],
49 shared_libs: [
50 "libart",
51 "libart-compiler",
52 "libsigchain",
53 ],
54}
55
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010056art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070057 name: "dex2oatd",
58 defaults: [
59 "art_debug_defaults",
60 "dex2oat-defaults",
61 ],
62 shared_libs: [
63 "libartd",
64 "libartd-compiler",
65 "libsigchain",
66 ],
67}
68
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010069art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070070 name: "dex2oats",
71 device_supported: false,
72 static_executable: true,
73 defaults: ["dex2oat-defaults"],
Colin Crossaa63aa22016-09-13 14:07:00 -070074 target: {
75 darwin: {
76 enabled: false,
77 },
78 },
Colin Cross2cfc4ba2016-09-13 16:55:55 -070079 ldflags: [
80 // We need this because GC stress mode makes use of
81 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
82 // defined in libgcc_eh.a(unwind-dw2.o)
83 // TODO: Having this is not ideal as it might obscure errors.
84 // Try to get rid of it.
85 "-z muldefs",
86 ],
Colin Crossc7376e02016-09-08 12:52:18 -070087 static_libs: [
88 "libart-compiler",
89 "libart",
90 "libvixl-arm",
91 "libvixl-arm64",
92 ] + art_static_dependencies,
93}
94
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010095art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070096 name: "dex2oatds",
97 device_supported: false,
98 static_executable: true,
99 defaults: [
100 "art_debug_defaults",
101 "dex2oat-defaults",
102 ],
Colin Crossaa63aa22016-09-13 14:07:00 -0700103 target: {
104 darwin: {
105 enabled: false,
106 },
107 },
Colin Cross2cfc4ba2016-09-13 16:55:55 -0700108 ldflags: [
109 // We need this because GC stress mode makes use of
110 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
111 // defined in libgcc_eh.a(unwind-dw2.o)
112 // TODO: Having this is not ideal as it might obscure errors.
113 // Try to get rid of it.
114 "-z muldefs",
115 ],
Colin Crossc7376e02016-09-08 12:52:18 -0700116 static_libs: [
117 "libartd-compiler",
118 "libartd",
119 "libvixld-arm",
120 "libvixld-arm64",
121 ] + art_static_dependencies,
122}
Colin Cross6e95dd52016-09-12 15:37:10 -0700123
124art_cc_test {
125 name: "art_dex2oat_tests",
126 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700127 "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -0700128 ],
129 srcs: ["dex2oat_test.cc"],
130}