blob: 05a5d0fa2c143d6a1f3bfc00509502f40fcbf30f [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,
Vishwath Mohan07407cd2016-09-29 15:05:51 -070034 coverage: false,
Colin Crossc7376e02016-09-08 12:52:18 -070035 },
36 },
Colin Crossc7376e02016-09-08 12:52:18 -070037 },
38
39
40 include_dirs: [
41 "art/cmdline",
42 ],
43}
44
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010045art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070046 name: "dex2oat",
47 defaults: [
48 "dex2oat-defaults",
49 ],
50 shared_libs: [
51 "libart",
52 "libart-compiler",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070053 "libbase",
Colin Crossc7376e02016-09-08 12:52:18 -070054 "libsigchain",
55 ],
56}
57
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010058art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070059 name: "dex2oatd",
60 defaults: [
61 "art_debug_defaults",
62 "dex2oat-defaults",
63 ],
64 shared_libs: [
65 "libartd",
66 "libartd-compiler",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070067 "libbase",
Colin Crossc7376e02016-09-08 12:52:18 -070068 "libsigchain",
69 ],
70}
71
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010072art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070073 name: "dex2oats",
74 device_supported: false,
75 static_executable: true,
76 defaults: ["dex2oat-defaults"],
Colin Crossaa63aa22016-09-13 14:07:00 -070077 target: {
78 darwin: {
79 enabled: false,
80 },
81 },
Colin Cross2cfc4ba2016-09-13 16:55:55 -070082 ldflags: [
83 // We need this because GC stress mode makes use of
84 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
85 // defined in libgcc_eh.a(unwind-dw2.o)
86 // TODO: Having this is not ideal as it might obscure errors.
87 // Try to get rid of it.
88 "-z muldefs",
89 ],
Colin Crossc7376e02016-09-08 12:52:18 -070090 static_libs: [
91 "libart-compiler",
92 "libart",
93 "libvixl-arm",
94 "libvixl-arm64",
95 ] + art_static_dependencies,
96}
97
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010098art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070099 name: "dex2oatds",
100 device_supported: false,
101 static_executable: true,
102 defaults: [
103 "art_debug_defaults",
104 "dex2oat-defaults",
105 ],
Colin Crossaa63aa22016-09-13 14:07:00 -0700106 target: {
107 darwin: {
108 enabled: false,
109 },
110 },
Colin Cross2cfc4ba2016-09-13 16:55:55 -0700111 ldflags: [
112 // We need this because GC stress mode makes use of
113 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
114 // defined in libgcc_eh.a(unwind-dw2.o)
115 // TODO: Having this is not ideal as it might obscure errors.
116 // Try to get rid of it.
117 "-z muldefs",
118 ],
Colin Crossc7376e02016-09-08 12:52:18 -0700119 static_libs: [
120 "libartd-compiler",
121 "libartd",
122 "libvixld-arm",
123 "libvixld-arm64",
124 ] + art_static_dependencies,
125}
Colin Cross6e95dd52016-09-12 15:37:10 -0700126
127art_cc_test {
128 name: "art_dex2oat_tests",
129 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700130 "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -0700131 ],
132 srcs: ["dex2oat_test.cc"],
133}