blob: 0d453efc0cf16afbe7e03349e1c52c82d90feaed [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",
Colin Crossc7376e02016-09-08 12:52:18 -070033 },
Colin Crossc7376e02016-09-08 12:52:18 -070034 },
35
36
37 include_dirs: [
38 "art/cmdline",
39 ],
Andreas Gampe7b565912017-03-20 15:48:52 -070040 header_libs: ["dex2oat_headers"],
Colin Crossc7376e02016-09-08 12:52:18 -070041}
42
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010043art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070044 name: "dex2oat",
45 defaults: [
46 "dex2oat-defaults",
47 ],
48 shared_libs: [
49 "libart",
50 "libart-compiler",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070051 "libbase",
Colin Crossc7376e02016-09-08 12:52:18 -070052 "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",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070065 "libbase",
Colin Crossc7376e02016-09-08 12:52:18 -070066 "libsigchain",
67 ],
68}
69
Nicolas Geoffrayafa7e452016-09-14 10:26:56 +010070art_cc_binary {
Colin Crossc7376e02016-09-08 12:52:18 -070071 name: "dex2oats",
72 device_supported: false,
73 static_executable: true,
74 defaults: ["dex2oat-defaults"],
Colin Crossaa63aa22016-09-13 14:07:00 -070075 target: {
76 darwin: {
77 enabled: false,
78 },
79 },
Colin Cross2cfc4ba2016-09-13 16:55:55 -070080 ldflags: [
81 // We need this because GC stress mode makes use of
82 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
83 // defined in libgcc_eh.a(unwind-dw2.o)
84 // TODO: Having this is not ideal as it might obscure errors.
85 // Try to get rid of it.
86 "-z muldefs",
87 ],
Colin Crossc7376e02016-09-08 12:52:18 -070088 static_libs: [
89 "libart-compiler",
Jeff Hao608f2ce2016-10-19 11:17:11 -070090 "libart-dexlayout",
Colin Crossc7376e02016-09-08 12:52:18 -070091 "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",
Jeff Hao608f2ce2016-10-19 11:17:11 -0700120 "libartd-dexlayout",
Colin Crossc7376e02016-09-08 12:52:18 -0700121 "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 ],
Mathieu Chartierf70fe3d2017-06-21 15:24:02 -0700132 srcs: [
133 "dex2oat_test.cc",
134 "dex2oat_image_test.cc",
135 ],
Andreas Gampef7882972017-03-20 16:35:24 -0700136 header_libs: ["dex2oat_headers"],
Colin Cross6e95dd52016-09-12 15:37:10 -0700137}