blob: 1bc6334d1b5f9e6ca8c8c554d47a7a157d75f63e [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"],
Dan Willemsen4d4f3be2021-09-15 00:04:12 -070037 visibility: ["//development/build"],
David Sehr5a1f6292018-01-19 11:08:51 -080038 host_supported: true,
Colin Crossa9c05322017-10-19 10:25:42 -070039 target: {
Orion Hodson520a4362019-04-18 09:34:45 +010040 android: {
41 shared_libs: [
42 "libdexfile",
43 "libartbase",
44 "libbase",
45 ],
46 },
47 // Use static libs on host: required for Windows build and
48 // static_sdk_tools build.
49 host: {
Martin Stjernholm2b527c42021-05-11 19:23:52 +010050 stl: "libc++_static",
David Sehr4f215d12019-04-03 09:28:21 -070051 static_libs: [
52 "libdexfile",
53 "libartbase",
54 "libbase",
55 "libartpalette",
56 "liblog",
57 "libz",
58 "libziparchive",
59 ],
David Srbeckyb29ecc12019-04-15 15:10:59 +010060 },
Greg Hartman063c9852019-04-18 23:49:41 +000061 darwin: {
62 enabled: true,
63 },
Martin Stjernholm7cdd7d92021-05-19 21:58:41 +010064 windows: {
65 // dexdump is provided in the Windows SDK.
66 enabled: true,
67 },
Andreas Gampe0dc93b12019-05-15 10:30:22 -070068 },
Jiyong Park066dd9022019-12-19 02:11:59 +000069 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +010070 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +000071 "com.android.art.debug",
Jiyong Park066dd9022019-12-19 02:11:59 +000072 ],
Colin Crossa9c05322017-10-19 10:25:42 -070073}
74
Roland Levillainf0409142021-03-22 15:45:03 +000075art_cc_defaults {
76 name: "art_dexdump_tests_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -070077 srcs: ["dexdump_test.cc"],
Yo Chiang169dfb42020-08-07 04:22:18 +000078 target: {
79 host: {
80 required: ["dexdump"],
81 },
82 },
Colin Cross6e95dd52016-09-12 15:37:10 -070083}
Roland Levillainf0409142021-03-22 15:45:03 +000084
85// Version of ART gtest `art_dexdump_tests` bundled with the ART APEX on target.
86// TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete.
87art_cc_test {
88 name: "art_dexdump_tests",
89 defaults: [
90 "art_gtest_defaults",
91 "art_dexdump_tests_defaults",
92 ],
93}
94
95// Standalone version of ART gtest `art_dexdump_tests`, not bundled with the ART APEX on target.
96art_cc_test {
97 name: "art_standalone_dexdump_tests",
98 defaults: [
99 "art_standalone_gtest_defaults",
100 "art_dexdump_tests_defaults",
101 ],
Jiakai Zhangd539f862022-02-08 14:56:05 +0000102 data: [":generate-boot-image"],
103 test_config_template: ":art-gtests-target-standalone-with-boot-image-template",
Roland Levillainf0409142021-03-22 15:45:03 +0000104}