blob: 535acdff62c46cea76f8ed52b7fcd1ad99132d4d [file] [log] [blame]
Colin Crossfe6064a2016-08-30 13:49:26 -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: "oatdump-defaults",
19 defaults: ["art_defaults"],
20 host_supported: true,
21 srcs: ["oatdump.cc"],
22 target: {
23 android: {
24 shared_libs: ["libcutils"],
25 },
26 },
Chih-Hung Hsieh238c9632018-05-08 10:22:52 -070027 // b/79417743, oatdump 32-bit tests failed with clang lld
28 use_clang_lld: false,
Andreas Gampe3157fc22017-08-23 09:43:46 -070029 header_libs: [
30 "art_cmdlineparser_headers",
31 ],
Colin Crossfe6064a2016-08-30 13:49:26 -070032}
33
34art_cc_binary {
35 name: "oatdump",
36 defaults: ["oatdump-defaults"],
37 shared_libs: [
38 "libart",
39 "libart-compiler",
40 "libart-disassembler",
David Sehr0225f8e2018-01-31 08:52:24 +000041 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -070042 "libprofile",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070043 "libbase",
Colin Crossfe6064a2016-08-30 13:49:26 -070044 ],
45}
46
47art_cc_binary {
48 name: "oatdumpd",
49 defaults: [
50 "art_debug_defaults",
51 "oatdump-defaults",
52 ],
53 shared_libs: [
54 "libartd",
55 "libartd-compiler",
56 "libartd-disassembler",
David Sehrfcbe15c2018-02-15 09:41:13 -080057 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -070058 "libprofiled",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070059 "libbase",
Colin Crossfe6064a2016-08-30 13:49:26 -070060 ],
61}
62
63art_cc_binary {
64 name: "oatdumps",
Colin Crossd2c20802016-09-19 12:57:18 -070065 device_supported: false,
Roland Levillain7f07f552016-11-22 17:20:46 +000066 static_executable: true,
67 defaults: ["oatdump-defaults"],
Colin Cross8dd90682016-09-08 16:43:27 -070068 target: {
69 darwin: {
70 enabled: false,
71 },
72 },
Roland Levillain7f07f552016-11-22 17:20:46 +000073 ldflags: [
74 // We need this because GC stress mode makes use of
75 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
76 // defined in libgcc_eh.a(unwind-dw2.o)
77 // TODO: Having this is not ideal as it might obscure errors.
78 // Try to get rid of it.
79 "-z muldefs",
80 ],
Colin Crossfe6064a2016-08-30 13:49:26 -070081 static_libs: [
82 "libart",
David Sehrfcbe15c2018-02-15 09:41:13 -080083 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -070084 "libprofile",
Colin Crossfe6064a2016-08-30 13:49:26 -070085 "libart-compiler",
86 "libart-disassembler",
87 "libvixl-arm",
88 "libvixl-arm64",
89 ] + art_static_dependencies,
90}
91
92art_cc_binary {
93 name: "oatdumpds",
Roland Levillain7f07f552016-11-22 17:20:46 +000094 device_supported: false,
95 static_executable: true,
Colin Crossfe6064a2016-08-30 13:49:26 -070096 defaults: [
97 "art_debug_defaults",
98 "oatdump-defaults",
99 ],
Colin Cross8dd90682016-09-08 16:43:27 -0700100 target: {
101 darwin: {
102 enabled: false,
103 },
Pirama Arumuga Nainar6f5b4d22018-04-20 12:02:02 -0700104 linux_glibc_x86_64: {
105 use_clang_lld: true,
106 },
Colin Cross8dd90682016-09-08 16:43:27 -0700107 },
Roland Levillain7f07f552016-11-22 17:20:46 +0000108 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 Crossfe6064a2016-08-30 13:49:26 -0700116 static_libs: [
117 "libartd",
David Sehrfcbe15c2018-02-15 09:41:13 -0800118 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700119 "libprofiled",
Colin Crossfe6064a2016-08-30 13:49:26 -0700120 "libartd-compiler",
121 "libartd-disassembler",
122 "libvixld-arm",
123 "libvixld-arm64",
124 ] + art_static_dependencies,
125}
126
Colin Cross6e95dd52016-09-12 15:37:10 -0700127art_cc_test {
128 name: "art_oatdump_tests",
129 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700130 "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -0700131 ],
Vladimir Marko1352f132017-04-28 15:28:29 +0100132 srcs: [
Vladimir Marko421087b2018-02-27 11:00:17 +0000133 "oatdump_app_test.cc",
Vladimir Marko1352f132017-04-28 15:28:29 +0100134 "oatdump_test.cc",
135 "oatdump_image_test.cc",
136 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700137}