blob: 64d49b47d3c366cba749851fa314bbee0be36eef [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 ],
40}
41
42art_cc_binary {
43 name: "oatdumpd",
44 defaults: [
45 "art_debug_defaults",
46 "oatdump-defaults",
47 ],
48 shared_libs: [
49 "libartd",
50 "libartd-compiler",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +030051 "libartd-dexlayout",
Colin Crossfe6064a2016-08-30 13:49:26 -070052 "libartd-disassembler",
David Sehrfcbe15c2018-02-15 09:41:13 -080053 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -070054 "libartbased",
David Sehr82d046e2018-04-23 08:14:19 -070055 "libprofiled",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070056 "libbase",
Colin Crossfe6064a2016-08-30 13:49:26 -070057 ],
58}
59
Andreas Gampe11bf2652018-07-10 14:21:15 -070060cc_defaults {
61 name: "oatdumps-defaults",
Colin Crossd2c20802016-09-19 12:57:18 -070062 device_supported: false,
Roland Levillain7f07f552016-11-22 17:20:46 +000063 static_executable: true,
Andreas Gampeec5ed062018-01-26 16:20:02 -080064 defaults: [
65 "oatdump-defaults",
66 ],
Colin Cross8dd90682016-09-08 16:43:27 -070067 target: {
68 darwin: {
69 enabled: false,
70 },
71 },
Roland Levillain7f07f552016-11-22 17:20:46 +000072 ldflags: [
73 // We need this because GC stress mode makes use of
74 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
75 // defined in libgcc_eh.a(unwind-dw2.o)
76 // TODO: Having this is not ideal as it might obscure errors.
77 // Try to get rid of it.
78 "-z muldefs",
79 ],
Andreas Gampeec5ed062018-01-26 16:20:02 -080080 static_libs: ["libsigchain_dummy"],
Andreas Gampe11bf2652018-07-10 14:21:15 -070081}
82
83art_cc_binary {
84 name: "oatdumps",
Andreas Gampeec5ed062018-01-26 16:20:02 -080085 defaults: [
86 "libart_static_defaults",
87 "libartbase_static_defaults",
88 "libdexfile_static_defaults",
89 "libprofile_static_defaults",
90 "libart-compiler_static_defaults",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +030091 "libart-dexlayout_static_defaults",
Andreas Gampeec5ed062018-01-26 16:20:02 -080092 "oatdumps-defaults",
93 ],
Colin Crossfe6064a2016-08-30 13:49:26 -070094 static_libs: [
Colin Crossfe6064a2016-08-30 13:49:26 -070095 "libart-disassembler",
Roland Levillain12dd9ae2018-11-06 13:32:06 +000096 "libvixl",
Andreas Gampe11bf2652018-07-10 14:21:15 -070097 ],
Martin Stjernholm7e7ab232019-02-01 12:58:08 +000098 // We need this to resolve libartpalette symbols
99 // correctly. Multiple source libraries depend on it.
Martin Stjernholm84bf6982019-02-05 15:07:57 +0000100 // TODO(b/122885634): This is also necessary for the static lib ordering bug
101 // with APEX stubs.
Martin Stjernholm23b27042019-01-11 10:36:35 +0000102 group_static_libs: true,
Colin Crossfe6064a2016-08-30 13:49:26 -0700103}
104
105art_cc_binary {
106 name: "oatdumpds",
107 defaults: [
108 "art_debug_defaults",
Andreas Gampeec5ed062018-01-26 16:20:02 -0800109 "libartd_static_defaults",
110 "libartbased_static_defaults",
111 "libdexfiled_static_defaults",
112 "libprofiled_static_defaults",
113 "libartd-compiler_static_defaults",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +0300114 "libartd-dexlayout_static_defaults",
Andreas Gampe11bf2652018-07-10 14:21:15 -0700115 "oatdumps-defaults",
Colin Crossfe6064a2016-08-30 13:49:26 -0700116 ],
Colin Cross8dd90682016-09-08 16:43:27 -0700117 target: {
Pirama Arumuga Nainar6f5b4d22018-04-20 12:02:02 -0700118 linux_glibc_x86_64: {
119 use_clang_lld: true,
120 },
Colin Cross8dd90682016-09-08 16:43:27 -0700121 },
Colin Crossfe6064a2016-08-30 13:49:26 -0700122 static_libs: [
Colin Crossfe6064a2016-08-30 13:49:26 -0700123 "libartd-disassembler",
Roland Levillain12dd9ae2018-11-06 13:32:06 +0000124 "libvixld",
Andreas Gampe11bf2652018-07-10 14:21:15 -0700125 ],
Andreas Gampe802bcf52018-09-07 16:20:58 -0700126 group_static_libs: true,
Colin Crossfe6064a2016-08-30 13:49:26 -0700127}
128
Colin Cross6e95dd52016-09-12 15:37:10 -0700129art_cc_test {
130 name: "art_oatdump_tests",
131 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700132 "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -0700133 ],
Vladimir Marko1352f132017-04-28 15:28:29 +0100134 srcs: [
Vladimir Marko421087b2018-02-27 11:00:17 +0000135 "oatdump_app_test.cc",
Vladimir Marko1352f132017-04-28 15:28:29 +0100136 "oatdump_test.cc",
137 "oatdump_image_test.cc",
138 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700139}