1// Copyright (C) 2015 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "art_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["art_license"],
22}
23
24cc_defaults {
25    name: "dexdump_defaults",
26    defaults: ["art_defaults"],
27    srcs: [
28        "dexdump_cfg.cc",
29        "dexdump_main.cc",
30        "dexdump.cc",
31    ],
32}
33
34art_cc_binary {
35    name: "dexdump",
36    defaults: ["dexdump_defaults"],
37    host_supported: true,
38    target: {
39        android: {
40            shared_libs: [
41                "libdexfile",
42                "libartbase",
43                "libbase",
44            ],
45        },
46        // Use static libs on host: required for Windows build and
47        // static_sdk_tools build.
48        host: {
49            stl: "libc++_static",
50            static_libs: [
51                "libdexfile",
52                "libartbase",
53                "libbase",
54                "libartpalette",
55                "liblog",
56                "libz",
57                "libziparchive",
58            ],
59        },
60        darwin: {
61            enabled: true,
62        },
63        windows: {
64            // dexdump is provided in the Windows SDK.
65            enabled: true,
66        },
67    },
68    apex_available: [
69        "com.android.art",
70        "com.android.art.debug",
71    ],
72}
73
74art_cc_defaults {
75    name: "art_dexdump_tests_defaults",
76    srcs: ["dexdump_test.cc"],
77    target: {
78        host: {
79            required: ["dexdump"],
80        },
81    },
82}
83
84// Version of ART gtest `art_dexdump_tests` bundled with the ART APEX on target.
85// TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete.
86art_cc_test {
87    name: "art_dexdump_tests",
88    defaults: [
89        "art_gtest_defaults",
90        "art_dexdump_tests_defaults",
91    ],
92}
93
94// Standalone version of ART gtest `art_dexdump_tests`, not bundled with the ART APEX on target.
95art_cc_test {
96    name: "art_standalone_dexdump_tests",
97    defaults: [
98        "art_standalone_gtest_defaults",
99        "art_dexdump_tests_defaults",
100    ],
101}
102