blob: c30a2b285398e39d260b98b2aa523d97e31158d7 [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
17cc_defaults {
18 name: "libprofile_defaults",
19 defaults: ["art_defaults"],
Martin Stjernholm75b961a2020-05-07 01:45:27 +010020 visibility: [
21 // Visibility for prebuilt binaries from the prebuilt of this module.
22 // TODO(b/155921753): Restrict this when prebuilts are in their proper
23 // locations.
24 "//prebuilts:__subpackages__",
25 ],
David Sehr82d046e2018-04-23 08:14:19 -070026 host_supported: true,
27 srcs: [
Nicolas Geoffraya0fc13a2019-07-23 15:48:39 +010028 "profile/profile_boot_info.cc",
David Sehr82d046e2018-04-23 08:14:19 -070029 "profile/profile_compilation_info.cc",
30 ],
31 target: {
32 android: {
David Sehr9d9227a2018-12-19 12:32:50 -080033 shared_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000034 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080035 "libbase",
Jiyong Parkb1c8e162020-05-18 19:04:42 +090036 "libz",
David Sehr9d9227a2018-12-19 12:32:50 -080037 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000038 static_libs: [
39 // ZipArchive support, the order matters here to get all symbols.
40 "libziparchive",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000041 ],
Martin Stjernholme407d972020-09-17 01:31:10 +010042 export_shared_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h.
David Sehr82d046e2018-04-23 08:14:19 -070043 },
David Sehr9d9227a2018-12-19 12:32:50 -080044 not_windows: {
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000045 shared_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000046 "libartpalette",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000047 "libziparchive",
48 "libz",
David Sehr9d9227a2018-12-19 12:32:50 -080049 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000050 ],
Martin Stjernholme407d972020-09-17 01:31:10 +010051 export_shared_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h.
David Sehr9d9227a2018-12-19 12:32:50 -080052 },
53 windows: {
David Srbecky7711c352019-04-10 17:50:12 +010054 cflags: ["-Wno-thread-safety"],
David Sehr9d9227a2018-12-19 12:32:50 -080055 static_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000056 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080057 "libziparchive",
58 "libz",
59 "libbase",
60 ],
Martin Stjernholme407d972020-09-17 01:31:10 +010061 export_static_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h.
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000062 },
David Srbeckyd53f6062019-03-22 14:55:21 +000063 darwin: {
64 enabled: true,
65 },
David Sehr82d046e2018-04-23 08:14:19 -070066 },
Mathieu Chartier818cb802018-05-11 05:30:16 +000067 //generated_sources: ["art_libartbase_operator_srcs"],
David Sehr82d046e2018-04-23 08:14:19 -070068 cflags: ["-DBUILDING_LIBART=1"],
David Sehr82d046e2018-04-23 08:14:19 -070069 export_include_dirs: ["."],
David Sehr82d046e2018-04-23 08:14:19 -070070}
71
Andreas Gampeec5ed062018-01-26 16:20:02 -080072cc_defaults {
73 name: "libprofile_static_base_defaults",
74 static_libs: [
75 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000076 "libz",
77 "libziparchive",
Andreas Gampeec5ed062018-01-26 16:20:02 -080078 ],
79}
80
81cc_defaults {
82 name: "libprofile_static_defaults",
83 defaults: [
84 "libprofile_static_base_defaults",
85 "libartbase_static_defaults",
86 "libdexfile_static_defaults",
87 ],
88 static_libs: ["libprofile"],
89}
90
91cc_defaults {
92 name: "libprofiled_static_defaults",
93 defaults: [
94 "libprofile_static_base_defaults",
95 "libartbased_static_defaults",
96 "libdexfiled_static_defaults",
97 ],
98 static_libs: ["libprofiled"],
99}
100
David Sehr82d046e2018-04-23 08:14:19 -0700101art_cc_library {
102 name: "libprofile",
Christopher Ferris0d38e852019-12-11 09:37:19 -0800103 defaults: [
104 "libprofile_defaults",
105 "libart_nativeunwind_defaults",
106 ],
David Sehr82d046e2018-04-23 08:14:19 -0700107 shared_libs: [
108 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000109 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700110 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000111 export_shared_lib_headers: ["libbase"],
David Sehr9d9227a2018-12-19 12:32:50 -0800112 target: {
David Srbecky7711c352019-04-10 17:50:12 +0100113 android: {
114 shared_libs: [
115 "libartbase",
116 "libdexfile",
117 ],
118 },
119 not_windows: {
120 shared_libs: [
121 "libartbase",
122 "libdexfile",
123 ],
124 },
David Sehr9d9227a2018-12-19 12:32:50 -0800125 windows: {
David Srbecky7711c352019-04-10 17:50:12 +0100126 enabled: true,
127 shared: {
128 enabled: false,
129 },
130 static_libs: [
131 "libartbase",
132 "libdexfile",
133 ],
134 },
135 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000136 apex_available: [
137 "com.android.art.release",
138 "com.android.art.debug",
139 ],
David Sehr82d046e2018-04-23 08:14:19 -0700140}
141
142art_cc_library {
143 name: "libprofiled",
144 defaults: [
145 "art_debug_defaults",
146 "libprofile_defaults",
147 ],
148 shared_libs: [
149 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000150 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700151 ],
David Srbecky7711c352019-04-10 17:50:12 +0100152 target: {
153 android: {
154 shared_libs: [
155 "libartbased",
156 "libdexfiled",
157 ],
158 },
159 not_windows: {
160 shared_libs: [
161 "libartbased",
162 "libdexfiled",
163 ],
164 },
165 windows: {
166 static_libs: [
167 "libartbased",
168 "libdexfiled",
169 ],
170 },
171 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000172 export_shared_lib_headers: ["libbase"],
Jiyong Park066dd9022019-12-19 02:11:59 +0000173 apex_available: [
174 "com.android.art.debug",
175 ],
David Sehr82d046e2018-04-23 08:14:19 -0700176}
177
178// For now many of these tests still use CommonRuntimeTest, almost universally because of
179// ScratchFile and related.
180// TODO: Remove CommonRuntimeTest dependency from these tests.
181art_cc_test {
182 name: "art_libprofile_tests",
183 defaults: [
184 "art_gtest_defaults",
185 ],
David Srbecky4a88a5a2020-05-05 16:21:57 +0100186 data: [
187 ":art-gtest-jars-ManyMethods",
188 ":art-gtest-jars-MultiDex",
189 ":art-gtest-jars-ProfileTestMultiDex",
190 ],
David Sehr82d046e2018-04-23 08:14:19 -0700191 srcs: [
Nicolas Geoffraya0fc13a2019-07-23 15:48:39 +0100192 "profile/profile_boot_info_test.cc",
David Sehr82d046e2018-04-23 08:14:19 -0700193 "profile/profile_compilation_info_test.cc",
194 ],
195 shared_libs: [
196 "libartbased",
197 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -0700198 "libartbased",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000199 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700200 ],
201}