blob: 50f806e3d7bbc716c986df8da40ee9559b5d01be [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 cflags: ["-DBUILDING_LIBART=1"],
David Sehr82d046e2018-04-23 08:14:19 -070072 export_include_dirs: ["."],
David Sehr82d046e2018-04-23 08:14:19 -070073}
74
Andreas Gampeec5ed062018-01-26 16:20:02 -080075cc_defaults {
76 name: "libprofile_static_base_defaults",
Martin Stjernholm35f765b2020-09-23 00:38:38 +010077 whole_static_libs: [
Andreas Gampeec5ed062018-01-26 16:20:02 -080078 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000079 "libz",
80 "libziparchive",
Andreas Gampeec5ed062018-01-26 16:20:02 -080081 ],
82}
83
84cc_defaults {
85 name: "libprofile_static_defaults",
86 defaults: [
87 "libprofile_static_base_defaults",
88 "libartbase_static_defaults",
89 "libdexfile_static_defaults",
90 ],
Martin Stjernholm35f765b2020-09-23 00:38:38 +010091 whole_static_libs: ["libprofile"],
Andreas Gampeec5ed062018-01-26 16:20:02 -080092}
93
94cc_defaults {
95 name: "libprofiled_static_defaults",
96 defaults: [
97 "libprofile_static_base_defaults",
98 "libartbased_static_defaults",
99 "libdexfiled_static_defaults",
100 ],
Martin Stjernholm35f765b2020-09-23 00:38:38 +0100101 whole_static_libs: ["libprofiled"],
Andreas Gampeec5ed062018-01-26 16:20:02 -0800102}
103
David Sehr82d046e2018-04-23 08:14:19 -0700104art_cc_library {
105 name: "libprofile",
Christopher Ferris0d38e852019-12-11 09:37:19 -0800106 defaults: [
107 "libprofile_defaults",
108 "libart_nativeunwind_defaults",
109 ],
David Sehr82d046e2018-04-23 08:14:19 -0700110 shared_libs: [
111 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000112 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700113 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000114 export_shared_lib_headers: ["libbase"],
David Sehr9d9227a2018-12-19 12:32:50 -0800115 target: {
David Srbecky7711c352019-04-10 17:50:12 +0100116 android: {
117 shared_libs: [
118 "libartbase",
119 "libdexfile",
120 ],
121 },
122 not_windows: {
123 shared_libs: [
124 "libartbase",
125 "libdexfile",
126 ],
127 },
David Sehr9d9227a2018-12-19 12:32:50 -0800128 windows: {
David Srbecky7711c352019-04-10 17:50:12 +0100129 enabled: true,
130 shared: {
131 enabled: false,
132 },
133 static_libs: [
134 "libartbase",
135 "libdexfile",
136 ],
137 },
138 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000139 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +0100140 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +0000141 "com.android.art.debug",
142 ],
David Sehr82d046e2018-04-23 08:14:19 -0700143}
144
145art_cc_library {
146 name: "libprofiled",
147 defaults: [
148 "art_debug_defaults",
149 "libprofile_defaults",
150 ],
151 shared_libs: [
152 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000153 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700154 ],
David Srbecky7711c352019-04-10 17:50:12 +0100155 target: {
156 android: {
157 shared_libs: [
158 "libartbased",
159 "libdexfiled",
160 ],
161 },
162 not_windows: {
163 shared_libs: [
164 "libartbased",
165 "libdexfiled",
166 ],
167 },
168 windows: {
169 static_libs: [
170 "libartbased",
171 "libdexfiled",
172 ],
173 },
174 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000175 export_shared_lib_headers: ["libbase"],
Jiyong Park066dd9022019-12-19 02:11:59 +0000176 apex_available: [
177 "com.android.art.debug",
178 ],
David Sehr82d046e2018-04-23 08:14:19 -0700179}
180
181// For now many of these tests still use CommonRuntimeTest, almost universally because of
182// ScratchFile and related.
183// TODO: Remove CommonRuntimeTest dependency from these tests.
184art_cc_test {
185 name: "art_libprofile_tests",
186 defaults: [
187 "art_gtest_defaults",
188 ],
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: [
199 "libartbased",
200 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -0700201 "libartbased",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000202 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700203 ],
204}