blob: 31faa3459f90cc51c10b983f6fab972101e88cd2 [file] [log] [blame]
Colin Crossfe6064a2016-08-30 13:49:26 -07001// 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
Bob Badour9150de62021-02-26 03:22:24 -080015package {
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
David Sehr5a1f6292018-01-19 11:08:51 -080024cc_defaults {
25 name: "dexdump_defaults",
Andreas Gampe70dfb692018-09-18 16:50:18 -070026 defaults: ["art_defaults"],
Colin Crossfe6064a2016-08-30 13:49:26 -070027 srcs: [
David Sehrcaacd112016-10-20 16:27:02 -070028 "dexdump_cfg.cc",
Colin Crossfe6064a2016-08-30 13:49:26 -070029 "dexdump_main.cc",
30 "dexdump.cc",
31 ],
David Sehr5a1f6292018-01-19 11:08:51 -080032}
33
34art_cc_binary {
David Sehr4f215d12019-04-03 09:28:21 -070035 name: "dexdump",
David Sehr5a1f6292018-01-19 11:08:51 -080036 defaults: ["dexdump_defaults"],
37 host_supported: true,
Colin Crossa9c05322017-10-19 10:25:42 -070038 target: {
Orion Hodson520a4362019-04-18 09:34:45 +010039 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: {
Martin Stjernholm2b527c42021-05-11 19:23:52 +010049 stl: "libc++_static",
David Sehr4f215d12019-04-03 09:28:21 -070050 static_libs: [
51 "libdexfile",
52 "libartbase",
53 "libbase",
54 "libartpalette",
55 "liblog",
56 "libz",
57 "libziparchive",
58 ],
David Srbeckyb29ecc12019-04-15 15:10:59 +010059 },
Greg Hartman063c9852019-04-18 23:49:41 +000060 darwin: {
61 enabled: true,
62 },
Martin Stjernholm7cdd7d92021-05-19 21:58:41 +010063 windows: {
64 // dexdump is provided in the Windows SDK.
65 enabled: true,
66 },
Andreas Gampe0dc93b12019-05-15 10:30:22 -070067 },
Jiyong Park066dd9022019-12-19 02:11:59 +000068 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +010069 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +000070 "com.android.art.debug",
Jiyong Park066dd9022019-12-19 02:11:59 +000071 ],
Colin Crossa9c05322017-10-19 10:25:42 -070072}
73
Roland Levillainf0409142021-03-22 15:45:03 +000074art_cc_defaults {
75 name: "art_dexdump_tests_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -070076 srcs: ["dexdump_test.cc"],
Yo Chiang169dfb42020-08-07 04:22:18 +000077 target: {
78 host: {
79 required: ["dexdump"],
80 },
81 },
Colin Cross6e95dd52016-09-12 15:37:10 -070082}
Roland Levillainf0409142021-03-22 15:45:03 +000083
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}