blob: ecbcd0b8a860084cc193cc572188f52a981e4e20 [file] [log] [blame]
David Sehr82d046e2018-04-23 08:14:19 -07001//
2// Copyright (C) 2018 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
Bob Badour9150de62021-02-26 03:22:24 -080017package {
18 // See: http://go/android-license-faq
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // all of the 'license_kinds' from "art_license"
21 // to get the below license kinds:
22 // SPDX-license-identifier-Apache-2.0
23 default_applicable_licenses: ["art_license"],
24}
25
David Sehr82d046e2018-04-23 08:14:19 -070026cc_defaults {
27 name: "libprofile_defaults",
28 defaults: ["art_defaults"],
29 host_supported: true,
30 srcs: [
Nicolas Geoffraya0fc13a2019-07-23 15:48:39 +010031 "profile/profile_boot_info.cc",
David Sehr82d046e2018-04-23 08:14:19 -070032 "profile/profile_compilation_info.cc",
33 ],
34 target: {
35 android: {
David Sehr9d9227a2018-12-19 12:32:50 -080036 shared_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000037 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080038 "libbase",
Jiyong Parkb1c8e162020-05-18 19:04:42 +090039 "libz",
David Sehr9d9227a2018-12-19 12:32:50 -080040 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000041 static_libs: [
42 // ZipArchive support, the order matters here to get all symbols.
43 "libziparchive",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000044 ],
Martin Stjernholme407d972020-09-17 01:31:10 +010045 export_shared_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h.
David Sehr82d046e2018-04-23 08:14:19 -070046 },
David Sehr9d9227a2018-12-19 12:32:50 -080047 not_windows: {
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000048 shared_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000049 "libartpalette",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000050 "libziparchive",
51 "libz",
David Sehr9d9227a2018-12-19 12:32:50 -080052 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000053 ],
Martin Stjernholme407d972020-09-17 01:31:10 +010054 export_shared_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h.
David Sehr9d9227a2018-12-19 12:32:50 -080055 },
56 windows: {
David Srbecky7711c352019-04-10 17:50:12 +010057 cflags: ["-Wno-thread-safety"],
David Sehr9d9227a2018-12-19 12:32:50 -080058 static_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000059 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080060 "libziparchive",
61 "libz",
62 "libbase",
63 ],
Martin Stjernholme407d972020-09-17 01:31:10 +010064 export_static_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h.
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000065 },
David Srbeckyd53f6062019-03-22 14:55:21 +000066 darwin: {
67 enabled: true,
68 },
David Sehr82d046e2018-04-23 08:14:19 -070069 },
Mathieu Chartier818cb802018-05-11 05:30:16 +000070 //generated_sources: ["art_libartbase_operator_srcs"],
David Sehr82d046e2018-04-23 08:14:19 -070071 export_include_dirs: ["."],
David Sehr82d046e2018-04-23 08:14:19 -070072}
73
Andreas Gampeec5ed062018-01-26 16:20:02 -080074cc_defaults {
75 name: "libprofile_static_base_defaults",
Martin Stjernholm35f765b2020-09-23 00:38:38 +010076 whole_static_libs: [
Andreas Gampeec5ed062018-01-26 16:20:02 -080077 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000078 "libz",
79 "libziparchive",
Andreas Gampeec5ed062018-01-26 16:20:02 -080080 ],
81}
82
83cc_defaults {
84 name: "libprofile_static_defaults",
85 defaults: [
86 "libprofile_static_base_defaults",
87 "libartbase_static_defaults",
88 "libdexfile_static_defaults",
89 ],
Martin Stjernholm35f765b2020-09-23 00:38:38 +010090 whole_static_libs: ["libprofile"],
Andreas Gampeec5ed062018-01-26 16:20:02 -080091}
92
93cc_defaults {
94 name: "libprofiled_static_defaults",
95 defaults: [
96 "libprofile_static_base_defaults",
97 "libartbased_static_defaults",
98 "libdexfiled_static_defaults",
99 ],
Martin Stjernholm35f765b2020-09-23 00:38:38 +0100100 whole_static_libs: ["libprofiled"],
Andreas Gampeec5ed062018-01-26 16:20:02 -0800101}
102
David Sehr82d046e2018-04-23 08:14:19 -0700103art_cc_library {
104 name: "libprofile",
Christopher Ferris0d38e852019-12-11 09:37:19 -0800105 defaults: [
106 "libprofile_defaults",
107 "libart_nativeunwind_defaults",
108 ],
David Sehr82d046e2018-04-23 08:14:19 -0700109 shared_libs: [
110 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000111 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700112 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000113 export_shared_lib_headers: ["libbase"],
David Sehr9d9227a2018-12-19 12:32:50 -0800114 target: {
David Srbecky7711c352019-04-10 17:50:12 +0100115 android: {
116 shared_libs: [
117 "libartbase",
118 "libdexfile",
119 ],
120 },
121 not_windows: {
122 shared_libs: [
123 "libartbase",
124 "libdexfile",
125 ],
126 },
David Sehr9d9227a2018-12-19 12:32:50 -0800127 windows: {
David Srbecky7711c352019-04-10 17:50:12 +0100128 enabled: true,
129 shared: {
130 enabled: false,
131 },
132 static_libs: [
133 "libartbase",
134 "libdexfile",
135 ],
136 },
137 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000138 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +0100139 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +0000140 "com.android.art.debug",
141 ],
David Sehr82d046e2018-04-23 08:14:19 -0700142}
143
144art_cc_library {
145 name: "libprofiled",
146 defaults: [
147 "art_debug_defaults",
148 "libprofile_defaults",
149 ],
150 shared_libs: [
151 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000152 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700153 ],
David Srbecky7711c352019-04-10 17:50:12 +0100154 target: {
155 android: {
156 shared_libs: [
157 "libartbased",
158 "libdexfiled",
159 ],
160 },
161 not_windows: {
162 shared_libs: [
163 "libartbased",
164 "libdexfiled",
165 ],
166 },
167 windows: {
168 static_libs: [
169 "libartbased",
170 "libdexfiled",
171 ],
172 },
173 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000174 export_shared_lib_headers: ["libbase"],
Jiyong Park066dd9022019-12-19 02:11:59 +0000175 apex_available: [
176 "com.android.art.debug",
Martin Stjernholma2f48a42021-04-09 13:23:21 +0100177 // TODO(b/183882457): This lib doesn't go into com.android.art, but
178 // apex_available lists need to be the same for internal libs to avoid
179 // stubs, and libartd depends on this.
180 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +0000181 ],
David Sehr82d046e2018-04-23 08:14:19 -0700182}
183
184// For now many of these tests still use CommonRuntimeTest, almost universally because of
185// ScratchFile and related.
186// TODO: Remove CommonRuntimeTest dependency from these tests.
Roland Levillainf0409142021-03-22 15:45:03 +0000187art_cc_defaults {
188 name: "art_libprofile_tests_defaults",
David Srbecky4a88a5a2020-05-05 16:21:57 +0100189 data: [
190 ":art-gtest-jars-ManyMethods",
191 ":art-gtest-jars-MultiDex",
192 ":art-gtest-jars-ProfileTestMultiDex",
193 ],
David Sehr82d046e2018-04-23 08:14:19 -0700194 srcs: [
Nicolas Geoffraya0fc13a2019-07-23 15:48:39 +0100195 "profile/profile_boot_info_test.cc",
David Sehr82d046e2018-04-23 08:14:19 -0700196 "profile/profile_compilation_info_test.cc",
197 ],
198 shared_libs: [
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000199 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700200 ],
201}
Roland Levillainf0409142021-03-22 15:45:03 +0000202
203// Version of ART gtest `art_libprofile_tests` bundled with the ART APEX on target.
204// TODO(b/192274705): Remove this module when the migration to standalone ART gtests is complete.
205art_cc_test {
206 name: "art_libprofile_tests",
207 defaults: [
208 "art_gtest_defaults",
209 "art_libprofile_tests_defaults",
210 ],
211 shared_libs: [
212 "libartbased",
213 "libdexfiled",
214 ],
215}
216
217// Standalone version of ART gtest `art_libprofile_tests`, not bundled with the ART APEX on target.
218art_cc_test {
219 name: "art_standalone_libprofile_tests",
220 defaults: [
221 "art_standalone_gtest_defaults",
222 "art_libprofile_tests_defaults",
223 ],
224 shared_libs: [
225 "libartbase",
226 "libdexfile",
227 ],
228 test_config: "art_standalone_libprofile_tests.xml",
229}