blob: 931bbd368b00c508c0c513ea6917144b9238b34f [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",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070052 "libbase",
Colin Crossc7376e02016-09-08 12:52:18 -070053 "libsigchain",
54 ],
55}
56
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010057art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070058 name: "dex2oatd",
59 defaults: [
60 "art_debug_defaults",
61 "dex2oat-defaults",
62 ],
63 shared_libs: [
64 "libartd",
65 "libartd-compiler",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070066 "libbase",
Colin Crossc7376e02016-09-08 12:52:18 -070067 "libsigchain",
68 ],
69}
70
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010071art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070072 name: "dex2oats",
73 device_supported: false,
74 static_executable: true,
75 defaults: ["dex2oat-defaults"],
Colin Crossaa63aa22016-09-13 14:07:00 -070076 target: {
77 darwin: {
78 enabled: false,
79 },
80 },
Colin Cross2cfc4ba2016-09-13 16:55:55 -070081 ldflags: [
82 // We need this because GC stress mode makes use of
83 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
84 // defined in libgcc_eh.a(unwind-dw2.o)
85 // TODO: Having this is not ideal as it might obscure errors.
86 // Try to get rid of it.
87 "-z muldefs",
88 ],
Colin Crossc7376e02016-09-08 12:52:18 -070089 static_libs: [
90 "libart-compiler",
91 "libart",
92 "libvixl-arm",
93 "libvixl-arm64",
94 ] + art_static_dependencies,
95}
96
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010097art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070098 name: "dex2oatds",
99 device_supported: false,
100 static_executable: true,
101 defaults: [
102 "art_debug_defaults",
103 "dex2oat-defaults",
104 ],
Colin Crossaa63aa22016-09-13 14:07:00 -0700105 target: {
106 darwin: {
107 enabled: false,
108 },
109 },
Colin Cross2cfc4ba2016-09-13 16:55:55 -0700110 ldflags: [
111 // We need this because GC stress mode makes use of
112 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
113 // defined in libgcc_eh.a(unwind-dw2.o)
114 // TODO: Having this is not ideal as it might obscure errors.
115 // Try to get rid of it.
116 "-z muldefs",
117 ],
Colin Crossc7376e02016-09-08 12:52:18 -0700118 static_libs: [
119 "libartd-compiler",
120 "libartd",
121 "libvixld-arm",
122 "libvixld-arm64",
123 ] + art_static_dependencies,
124}
Colin Cross6e95dd52016-09-12 15:37:10 -0700125
126art_cc_test {
127 name: "art_dex2oat_tests",
128 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700129 "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -0700130 ],
131 srcs: ["dex2oat_test.cc"],
132}