blob: fd0dee312a89df5f5d1f2070bfcb5389c2234c41 [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"],
Chih-Hung Hsieh238c9632018-05-08 10:22:52 -070022 // b/79417743, oatdump 32-bit tests failed with clang lld
23 use_clang_lld: false,
Andreas Gampe3157fc22017-08-23 09:43:46 -070024 header_libs: [
25 "art_cmdlineparser_headers",
26 ],
Colin Crossfe6064a2016-08-30 13:49:26 -070027}
28
29art_cc_binary {
30 name: "oatdump",
31 defaults: ["oatdump-defaults"],
32 shared_libs: [
33 "libart",
34 "libart-compiler",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +030035 "libart-dexlayout",
Colin Crossfe6064a2016-08-30 13:49:26 -070036 "libart-disassembler",
David Sehr0225f8e2018-01-31 08:52:24 +000037 "libdexfile",
David Sehr1f010162018-05-15 08:59:32 -070038 "libartbase",
David Sehr82d046e2018-04-23 08:14:19 -070039 "libprofile",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070040 "libbase",
Colin Crossfe6064a2016-08-30 13:49:26 -070041 ],
42}
43
44art_cc_binary {
45 name: "oatdumpd",
46 defaults: [
47 "art_debug_defaults",
48 "oatdump-defaults",
49 ],
50 shared_libs: [
51 "libartd",
52 "libartd-compiler",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +030053 "libartd-dexlayout",
Colin Crossfe6064a2016-08-30 13:49:26 -070054 "libartd-disassembler",
David Sehrfcbe15c2018-02-15 09:41:13 -080055 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -070056 "libartbased",
David Sehr82d046e2018-04-23 08:14:19 -070057 "libprofiled",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070058 "libbase",
Colin Crossfe6064a2016-08-30 13:49:26 -070059 ],
60}
61
Andreas Gampe11bf2652018-07-10 14:21:15 -070062cc_defaults {
63 name: "oatdumps-defaults",
Colin Crossd2c20802016-09-19 12:57:18 -070064 device_supported: false,
Roland Levillain7f07f552016-11-22 17:20:46 +000065 static_executable: true,
Andreas Gampeec5ed062018-01-26 16:20:02 -080066 defaults: [
67 "oatdump-defaults",
68 ],
Colin Cross8dd90682016-09-08 16:43:27 -070069 target: {
70 darwin: {
71 enabled: false,
72 },
73 },
Roland Levillain7f07f552016-11-22 17:20:46 +000074 ldflags: [
75 // We need this because GC stress mode makes use of
76 // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
77 // defined in libgcc_eh.a(unwind-dw2.o)
78 // TODO: Having this is not ideal as it might obscure errors.
79 // Try to get rid of it.
80 "-z muldefs",
81 ],
Andreas Gampeec5ed062018-01-26 16:20:02 -080082 static_libs: ["libsigchain_dummy"],
Andreas Gampe11bf2652018-07-10 14:21:15 -070083}
84
85art_cc_binary {
86 name: "oatdumps",
Andreas Gampeec5ed062018-01-26 16:20:02 -080087 defaults: [
88 "libart_static_defaults",
89 "libartbase_static_defaults",
90 "libdexfile_static_defaults",
91 "libprofile_static_defaults",
92 "libart-compiler_static_defaults",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +030093 "libart-dexlayout_static_defaults",
Andreas Gampeec5ed062018-01-26 16:20:02 -080094 "oatdumps-defaults",
95 ],
Colin Crossfe6064a2016-08-30 13:49:26 -070096 static_libs: [
Colin Crossfe6064a2016-08-30 13:49:26 -070097 "libart-disassembler",
Roland Levillain12dd9ae2018-11-06 13:32:06 +000098 "libvixl",
Andreas Gampe11bf2652018-07-10 14:21:15 -070099 ],
Martin Stjernholm7e7ab232019-02-01 12:58:08 +0000100 // We need this to resolve libartpalette symbols
101 // correctly. Multiple source libraries depend on it.
Martin Stjernholm84bf6982019-02-05 15:07:57 +0000102 // TODO(b/122885634): This is also necessary for the static lib ordering bug
103 // with APEX stubs.
Martin Stjernholm23b27042019-01-11 10:36:35 +0000104 group_static_libs: true,
Colin Crossfe6064a2016-08-30 13:49:26 -0700105}
106
107art_cc_binary {
108 name: "oatdumpds",
109 defaults: [
110 "art_debug_defaults",
Andreas Gampeec5ed062018-01-26 16:20:02 -0800111 "libartd_static_defaults",
112 "libartbased_static_defaults",
113 "libdexfiled_static_defaults",
114 "libprofiled_static_defaults",
115 "libartd-compiler_static_defaults",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +0300116 "libartd-dexlayout_static_defaults",
Andreas Gampe11bf2652018-07-10 14:21:15 -0700117 "oatdumps-defaults",
Colin Crossfe6064a2016-08-30 13:49:26 -0700118 ],
Colin Cross8dd90682016-09-08 16:43:27 -0700119 target: {
Pirama Arumuga Nainar6f5b4d22018-04-20 12:02:02 -0700120 linux_glibc_x86_64: {
121 use_clang_lld: true,
122 },
Colin Cross8dd90682016-09-08 16:43:27 -0700123 },
Colin Crossfe6064a2016-08-30 13:49:26 -0700124 static_libs: [
Colin Crossfe6064a2016-08-30 13:49:26 -0700125 "libartd-disassembler",
Roland Levillain12dd9ae2018-11-06 13:32:06 +0000126 "libvixld",
Andreas Gampe11bf2652018-07-10 14:21:15 -0700127 ],
Andreas Gampe802bcf52018-09-07 16:20:58 -0700128 group_static_libs: true,
Colin Crossfe6064a2016-08-30 13:49:26 -0700129}
130
Colin Cross6e95dd52016-09-12 15:37:10 -0700131art_cc_test {
132 name: "art_oatdump_tests",
133 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700134 "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -0700135 ],
Vladimir Marko1352f132017-04-28 15:28:29 +0100136 srcs: [
Vladimir Marko421087b2018-02-27 11:00:17 +0000137 "oatdump_app_test.cc",
Vladimir Marko1352f132017-04-28 15:28:29 +0100138 "oatdump_test.cc",
139 "oatdump_image_test.cc",
140 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700141}