blob: 5d53d45dd60e2aca55f59634d1c54493b6da9e5f [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"],
Andreas Gampe3157fc22017-08-23 09:43:46 -070022 header_libs: [
23 "art_cmdlineparser_headers",
24 ],
Colin Crossfe6064a2016-08-30 13:49:26 -070025}
26
27art_cc_binary {
28 name: "oatdump",
29 defaults: ["oatdump-defaults"],
30 shared_libs: [
31 "libart",
32 "libart-compiler",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +030033 "libart-dexlayout",
Colin Crossfe6064a2016-08-30 13:49:26 -070034 "libart-disassembler",
David Sehr0225f8e2018-01-31 08:52:24 +000035 "libdexfile",
David Sehr1f010162018-05-15 08:59:32 -070036 "libartbase",
David Sehr82d046e2018-04-23 08:14:19 -070037 "libprofile",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070038 "libbase",
Colin Crossfe6064a2016-08-30 13:49:26 -070039 ],
Jiyong Park066dd9022019-12-19 02:11:59 +000040 apex_available: [
41 "com.android.art.release",
42 "com.android.art.debug",
43 ],
Colin Crossfe6064a2016-08-30 13:49:26 -070044}
45
46art_cc_binary {
47 name: "oatdumpd",
48 defaults: [
49 "art_debug_defaults",
50 "oatdump-defaults",
51 ],
52 shared_libs: [
53 "libartd",
54 "libartd-compiler",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +030055 "libartd-dexlayout",
Colin Crossfe6064a2016-08-30 13:49:26 -070056 "libartd-disassembler",
David Sehrfcbe15c2018-02-15 09:41:13 -080057 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -070058 "libartbased",
David Sehr82d046e2018-04-23 08:14:19 -070059 "libprofiled",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070060 "libbase",
Colin Crossfe6064a2016-08-30 13:49:26 -070061 ],
Jiyong Park066dd9022019-12-19 02:11:59 +000062 apex_available: [
63 "com.android.art.debug",
64 ],
Colin Crossfe6064a2016-08-30 13:49:26 -070065}
66
Andreas Gampe11bf2652018-07-10 14:21:15 -070067cc_defaults {
68 name: "oatdumps-defaults",
Colin Crossd2c20802016-09-19 12:57:18 -070069 device_supported: false,
Roland Levillain7f07f552016-11-22 17:20:46 +000070 static_executable: true,
Andreas Gampeec5ed062018-01-26 16:20:02 -080071 defaults: [
72 "oatdump-defaults",
73 ],
Colin Cross8dd90682016-09-08 16:43:27 -070074 target: {
75 darwin: {
76 enabled: false,
77 },
78 },
Roland Levillain7f07f552016-11-22 17:20:46 +000079 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 ],
David Srbeckyd3ee9022020-07-27 16:05:38 +010087 static_libs: ["libsigchain_fake"],
Andreas Gampe11bf2652018-07-10 14:21:15 -070088}
89
90art_cc_binary {
91 name: "oatdumps",
Andreas Gampeec5ed062018-01-26 16:20:02 -080092 defaults: [
93 "libart_static_defaults",
94 "libartbase_static_defaults",
95 "libdexfile_static_defaults",
96 "libprofile_static_defaults",
97 "libart-compiler_static_defaults",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +030098 "libart-dexlayout_static_defaults",
Andreas Gampeec5ed062018-01-26 16:20:02 -080099 "oatdumps-defaults",
100 ],
Colin Crossfe6064a2016-08-30 13:49:26 -0700101 static_libs: [
Colin Crossfe6064a2016-08-30 13:49:26 -0700102 "libart-disassembler",
Roland Levillain12dd9ae2018-11-06 13:32:06 +0000103 "libvixl",
Andreas Gampe11bf2652018-07-10 14:21:15 -0700104 ],
Martin Stjernholm7e7ab232019-02-01 12:58:08 +0000105 // We need this to resolve libartpalette symbols
106 // correctly. Multiple source libraries depend on it.
Martin Stjernholm84bf6982019-02-05 15:07:57 +0000107 // TODO(b/122885634): This is also necessary for the static lib ordering bug
108 // with APEX stubs.
Martin Stjernholm23b27042019-01-11 10:36:35 +0000109 group_static_libs: true,
Colin Crossfe6064a2016-08-30 13:49:26 -0700110}
111
112art_cc_binary {
113 name: "oatdumpds",
114 defaults: [
115 "art_debug_defaults",
Andreas Gampeec5ed062018-01-26 16:20:02 -0800116 "libartd_static_defaults",
117 "libartbased_static_defaults",
118 "libdexfiled_static_defaults",
119 "libprofiled_static_defaults",
120 "libartd-compiler_static_defaults",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +0300121 "libartd-dexlayout_static_defaults",
Andreas Gampe11bf2652018-07-10 14:21:15 -0700122 "oatdumps-defaults",
Colin Crossfe6064a2016-08-30 13:49:26 -0700123 ],
Colin Cross8dd90682016-09-08 16:43:27 -0700124 target: {
Pirama Arumuga Nainar6f5b4d22018-04-20 12:02:02 -0700125 linux_glibc_x86_64: {
126 use_clang_lld: true,
127 },
Colin Cross8dd90682016-09-08 16:43:27 -0700128 },
Colin Crossfe6064a2016-08-30 13:49:26 -0700129 static_libs: [
Colin Crossfe6064a2016-08-30 13:49:26 -0700130 "libartd-disassembler",
Roland Levillain12dd9ae2018-11-06 13:32:06 +0000131 "libvixld",
Andreas Gampe11bf2652018-07-10 14:21:15 -0700132 ],
Andreas Gampe802bcf52018-09-07 16:20:58 -0700133 group_static_libs: true,
Colin Crossfe6064a2016-08-30 13:49:26 -0700134}
135
Colin Cross6e95dd52016-09-12 15:37:10 -0700136art_cc_test {
137 name: "art_oatdump_tests",
138 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700139 "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -0700140 ],
David Srbecky4a88a5a2020-05-05 16:21:57 +0100141 data: [
142 ":art-gtest-jars-ProfileTestMultiDex",
143 ],
Vladimir Marko1352f132017-04-28 15:28:29 +0100144 srcs: [
Vladimir Marko421087b2018-02-27 11:00:17 +0000145 "oatdump_app_test.cc",
Vladimir Marko1352f132017-04-28 15:28:29 +0100146 "oatdump_test.cc",
147 "oatdump_image_test.cc",
148 ],
David Srbecky2280b532020-05-27 00:30:44 +0100149 required: [
150 "oatdumpd",
151 "oatdumpds",
152 "dexdump",
153 "dex2oatd",
David Srbecky4a88a5a2020-05-05 16:21:57 +0100154 "dex2oatds",
David Srbecky2280b532020-05-27 00:30:44 +0100155 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700156}