1//
2// Copyright (C) 2014 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
17// Build variants {target,host} x {debug,ndebug} x {32,64}
18
19package {
20    // See: http://go/android-license-faq
21    // A large-scale-change added 'default_applicable_licenses' to import
22    // all of the 'license_kinds' from "art_license"
23    // to get the below license kinds:
24    //   SPDX-license-identifier-Apache-2.0
25    default_applicable_licenses: ["art_license"],
26    default_team: "trendy_team_art_performance",
27}
28
29cc_defaults {
30    name: "imgdiag-defaults",
31    host_supported: true,
32    srcs: [
33        "imgdiag.cc",
34        "page_util.cc",
35    ],
36    defaults: ["art_defaults"],
37
38    // Note that this tool needs to be built for both 32-bit and 64-bit since it requires
39    // that the image it's analyzing be the same ISA as the runtime ISA.
40    compile_multilib: "both",
41
42    shared_libs: [
43        "libbase",
44    ],
45    static_libs: [
46        "libprocinfo",
47    ],
48    target: {
49        host: {
50            shared_libs: ["libziparchive"],
51        },
52    },
53    header_libs: [
54        "art_cmdlineparser_headers",
55    ],
56    multilib: {
57        lib32: {
58            suffix: "32",
59        },
60        lib64: {
61            suffix: "64",
62        },
63    },
64    symlink_preferred_arch: true,
65}
66
67art_cc_binary {
68    name: "imgdiag",
69    defaults: ["imgdiag-defaults"],
70    shared_libs: [
71        "libart",
72        "libartbase",
73    ],
74    apex_available: [
75        "com.android.art",
76        "com.android.art.debug",
77    ],
78}
79
80art_cc_binary {
81    name: "imgdiagd",
82    defaults: [
83        "art_debug_defaults",
84        "imgdiag-defaults",
85    ],
86    shared_libs: [
87        "libartd",
88        "libartbased",
89        "libdexfiled",
90    ],
91    apex_available: [
92        "com.android.art.debug",
93    ],
94}
95
96art_cc_test {
97    name: "art_imgdiag_tests",
98    defaults: [
99        "art_gtest_defaults",
100    ],
101    srcs: ["imgdiag_test.cc"],
102    target: {
103        host: {
104            required: ["imgdiagd"],
105        },
106    },
107}
108
109cc_defaults {
110    name: "pageinfo-defaults",
111    host_supported: true,
112    srcs: [
113        "page_info.cc",
114        "page_util.cc",
115    ],
116    defaults: ["art_defaults"],
117
118    compile_multilib: "both",
119
120    shared_libs: [
121        "libbase",
122    ],
123    static_libs: [
124        "libprocinfo",
125    ],
126    header_libs: [
127        "art_cmdlineparser_headers",
128    ],
129    multilib: {
130        lib32: {
131            suffix: "32",
132        },
133        lib64: {
134            suffix: "64",
135        },
136    },
137    symlink_preferred_arch: true,
138}
139
140art_cc_binary {
141    name: "pageinfo",
142    defaults: ["pageinfo-defaults"],
143    shared_libs: [
144        "libart",
145        "libartbase",
146    ],
147    apex_available: [
148        "com.android.art",
149        "com.android.art.debug",
150    ],
151}
152