blob: 596a94664d0e76eef0ae77ad4b05abe3a0d48427 [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",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +030040 "libart-dexlayout",
Colin Crossfe6064a2016-08-30 13:49:26 -070041 "libart-disassembler",
David Sehr0225f8e2018-01-31 08:52:24 +000042 "libdexfile",
David Sehr1f010162018-05-15 08:59:32 -070043 "libartbase",
David Sehr82d046e2018-04-23 08:14:19 -070044 "libprofile",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070045 "libbase",
Colin Crossfe6064a2016-08-30 13:49:26 -070046 ],
47}
48
49art_cc_binary {
50 name: "oatdumpd",
51 defaults: [
52 "art_debug_defaults",
53 "oatdump-defaults",
54 ],
55 shared_libs: [
56 "libartd",
57 "libartd-compiler",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +030058 "libartd-dexlayout",
Colin Crossfe6064a2016-08-30 13:49:26 -070059 "libartd-disassembler",
David Sehrfcbe15c2018-02-15 09:41:13 -080060 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -070061 "libartbased",
David Sehr82d046e2018-04-23 08:14:19 -070062 "libprofiled",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070063 "libbase",
Colin Crossfe6064a2016-08-30 13:49:26 -070064 ],
65}
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 ],
Andreas Gampeec5ed062018-01-26 16:20:02 -080087 static_libs: ["libsigchain_dummy"],
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",
103 "libvixl-arm",
104 "libvixl-arm64",
Andreas Gampe11bf2652018-07-10 14:21:15 -0700105 ],
Colin Crossfe6064a2016-08-30 13:49:26 -0700106}
107
108art_cc_binary {
109 name: "oatdumpds",
110 defaults: [
111 "art_debug_defaults",
Andreas Gampeec5ed062018-01-26 16:20:02 -0800112 "libartd_static_defaults",
113 "libartbased_static_defaults",
114 "libdexfiled_static_defaults",
115 "libprofiled_static_defaults",
116 "libartd-compiler_static_defaults",
Anestis Bechtsoudis8583bec2018-09-08 22:32:29 +0300117 "libartd-dexlayout_static_defaults",
Andreas Gampe11bf2652018-07-10 14:21:15 -0700118 "oatdumps-defaults",
Colin Crossfe6064a2016-08-30 13:49:26 -0700119 ],
Colin Cross8dd90682016-09-08 16:43:27 -0700120 target: {
Pirama Arumuga Nainar6f5b4d22018-04-20 12:02:02 -0700121 linux_glibc_x86_64: {
122 use_clang_lld: true,
123 },
Colin Cross8dd90682016-09-08 16:43:27 -0700124 },
Colin Crossfe6064a2016-08-30 13:49:26 -0700125 static_libs: [
Colin Crossfe6064a2016-08-30 13:49:26 -0700126 "libartd-disassembler",
127 "libvixld-arm",
128 "libvixld-arm64",
Andreas Gampe11bf2652018-07-10 14:21:15 -0700129 ],
Andreas Gampe802bcf52018-09-07 16:20:58 -0700130 group_static_libs: true,
Colin Crossfe6064a2016-08-30 13:49:26 -0700131}
132
Colin Cross6e95dd52016-09-12 15:37:10 -0700133art_cc_test {
134 name: "art_oatdump_tests",
135 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700136 "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -0700137 ],
Vladimir Marko1352f132017-04-28 15:28:29 +0100138 srcs: [
Vladimir Marko421087b2018-02-27 11:00:17 +0000139 "oatdump_app_test.cc",
Vladimir Marko1352f132017-04-28 15:28:29 +0100140 "oatdump_test.cc",
141 "oatdump_image_test.cc",
142 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700143}