blob: 890c70c8216a26e3fb92b71b0ef86b82f71fe2f8 [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",
36 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000037 static_libs: [
38 // ZipArchive support, the order matters here to get all symbols.
39 "libziparchive",
40 "libz",
41 ],
David Sehr9d9227a2018-12-19 12:32:50 -080042 export_shared_lib_headers: ["libbase"],
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 ],
David Sehr9d9227a2018-12-19 12:32:50 -080051 export_shared_lib_headers: ["libbase"],
52 },
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 ],
61 export_static_lib_headers: ["libbase"],
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: ["."],
70 // ART's macros.h depends on libbase's macros.h.
71 // Note: runtime_options.h depends on cmdline. But we don't really want to export this
72 // generically. dex2oat takes care of it itself.
David Sehr82d046e2018-04-23 08:14:19 -070073}
74
Andreas Gampeec5ed062018-01-26 16:20:02 -080075cc_defaults {
76 name: "libprofile_static_base_defaults",
77 static_libs: [
78 "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 ],
91 static_libs: ["libprofile"],
92}
93
94cc_defaults {
95 name: "libprofiled_static_defaults",
96 defaults: [
97 "libprofile_static_base_defaults",
98 "libartbased_static_defaults",
99 "libdexfiled_static_defaults",
100 ],
101 static_libs: ["libprofiled"],
102}
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: [
140 "com.android.art.release",
141 "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 ],
189 srcs: [
Nicolas Geoffraya0fc13a2019-07-23 15:48:39 +0100190 "profile/profile_boot_info_test.cc",
David Sehr82d046e2018-04-23 08:14:19 -0700191 "profile/profile_compilation_info_test.cc",
192 ],
193 shared_libs: [
194 "libartbased",
195 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -0700196 "libartbased",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000197 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700198 ],
199}