1//
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    },
27    header_libs: [
28        "art_cmdlineparser_headers",
29    ],
30}
31
32art_cc_binary {
33    name: "oatdump",
34    defaults: ["oatdump-defaults"],
35    shared_libs: [
36        "libart",
37        "libart-compiler",
38        "libart-disassembler",
39        "libdexfile",
40        "libbase",
41    ],
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",
53        "libartd-disassembler",
54        "libdexfiled",
55        "libbase",
56    ],
57}
58
59art_cc_binary {
60    name: "oatdumps",
61    device_supported: false,
62    static_executable: true,
63    defaults: ["oatdump-defaults"],
64    target: {
65        darwin: {
66            enabled: false,
67        },
68    },
69    ldflags: [
70        // We need this because GC stress mode makes use of
71        // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
72        // defined in libgcc_eh.a(unwind-dw2.o)
73        // TODO: Having this is not ideal as it might obscure errors.
74        // Try to get rid of it.
75        "-z muldefs",
76    ],
77    static_libs: [
78        "libart",
79        "libdexfile",
80        "libart-compiler",
81        "libart-disassembler",
82        "libvixl-arm",
83        "libvixl-arm64",
84    ] + art_static_dependencies,
85}
86
87art_cc_binary {
88    name: "oatdumpds",
89    device_supported: false,
90    static_executable: true,
91    defaults: [
92        "art_debug_defaults",
93        "oatdump-defaults",
94    ],
95    target: {
96        darwin: {
97            enabled: false,
98        },
99    },
100    ldflags: [
101        // We need this because GC stress mode makes use of
102        // _Unwind_GetIP and _Unwind_Backtrace and the symbols are also
103        // defined in libgcc_eh.a(unwind-dw2.o)
104        // TODO: Having this is not ideal as it might obscure errors.
105        // Try to get rid of it.
106        "-z muldefs",
107    ],
108    static_libs: [
109        "libartd",
110        "libdexfiled",
111        "libartd-compiler",
112        "libartd-disassembler",
113        "libvixld-arm",
114        "libvixld-arm64",
115    ] + art_static_dependencies,
116}
117
118art_cc_test {
119    name: "art_oatdump_tests",
120    defaults: [
121        "art_gtest_defaults",
122    ],
123    srcs: [
124        "oatdump_app_test.cc",
125        "oatdump_test.cc",
126        "oatdump_image_test.cc",
127    ],
128}
129