blob: 367eefc1e31a13959eb1b4e50d9b6af51b3ae81d [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"],
20 host_supported: true,
21 srcs: [
Nicolas Geoffraya0fc13a2019-07-23 15:48:39 +010022 "profile/profile_boot_info.cc",
David Sehr82d046e2018-04-23 08:14:19 -070023 "profile/profile_compilation_info.cc",
24 ],
25 target: {
26 android: {
David Sehr9d9227a2018-12-19 12:32:50 -080027 shared_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000028 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080029 "libbase",
30 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000031 static_libs: [
32 // ZipArchive support, the order matters here to get all symbols.
33 "libziparchive",
34 "libz",
35 ],
David Sehr9d9227a2018-12-19 12:32:50 -080036 export_shared_lib_headers: ["libbase"],
David Sehr82d046e2018-04-23 08:14:19 -070037 },
David Sehr9d9227a2018-12-19 12:32:50 -080038 not_windows: {
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000039 shared_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000040 "libartpalette",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000041 "libziparchive",
42 "libz",
David Sehr9d9227a2018-12-19 12:32:50 -080043 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000044 ],
David Sehr9d9227a2018-12-19 12:32:50 -080045 export_shared_lib_headers: ["libbase"],
46 },
47 windows: {
David Srbecky7711c352019-04-10 17:50:12 +010048 cflags: ["-Wno-thread-safety"],
David Sehr9d9227a2018-12-19 12:32:50 -080049 static_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000050 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080051 "libziparchive",
52 "libz",
53 "libbase",
54 ],
55 export_static_lib_headers: ["libbase"],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000056 },
David Srbeckyd53f6062019-03-22 14:55:21 +000057 darwin: {
58 enabled: true,
59 },
David Sehr82d046e2018-04-23 08:14:19 -070060 },
Mathieu Chartier818cb802018-05-11 05:30:16 +000061 //generated_sources: ["art_libartbase_operator_srcs"],
David Sehr82d046e2018-04-23 08:14:19 -070062 cflags: ["-DBUILDING_LIBART=1"],
David Sehr82d046e2018-04-23 08:14:19 -070063 export_include_dirs: ["."],
64 // ART's macros.h depends on libbase's macros.h.
65 // Note: runtime_options.h depends on cmdline. But we don't really want to export this
66 // generically. dex2oat takes care of it itself.
David Sehr82d046e2018-04-23 08:14:19 -070067}
68
Andreas Gampeec5ed062018-01-26 16:20:02 -080069cc_defaults {
70 name: "libprofile_static_base_defaults",
71 static_libs: [
72 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000073 "libz",
74 "libziparchive",
Andreas Gampeec5ed062018-01-26 16:20:02 -080075 ],
76}
77
78cc_defaults {
79 name: "libprofile_static_defaults",
80 defaults: [
81 "libprofile_static_base_defaults",
82 "libartbase_static_defaults",
83 "libdexfile_static_defaults",
84 ],
85 static_libs: ["libprofile"],
86}
87
88cc_defaults {
89 name: "libprofiled_static_defaults",
90 defaults: [
91 "libprofile_static_base_defaults",
92 "libartbased_static_defaults",
93 "libdexfiled_static_defaults",
94 ],
95 static_libs: ["libprofiled"],
96}
97
David Sehr82d046e2018-04-23 08:14:19 -070098art_cc_library {
99 name: "libprofile",
Christopher Ferris0d38e852019-12-11 09:37:19 -0800100 defaults: [
101 "libprofile_defaults",
102 "libart_nativeunwind_defaults",
103 ],
David Sehr82d046e2018-04-23 08:14:19 -0700104 shared_libs: [
105 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000106 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700107 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000108 export_shared_lib_headers: ["libbase"],
David Sehr9d9227a2018-12-19 12:32:50 -0800109 target: {
David Srbecky7711c352019-04-10 17:50:12 +0100110 android: {
111 shared_libs: [
112 "libartbase",
113 "libdexfile",
114 ],
115 },
116 not_windows: {
117 shared_libs: [
118 "libartbase",
119 "libdexfile",
120 ],
121 },
David Sehr9d9227a2018-12-19 12:32:50 -0800122 windows: {
David Srbecky7711c352019-04-10 17:50:12 +0100123 enabled: true,
124 shared: {
125 enabled: false,
126 },
127 static_libs: [
128 "libartbase",
129 "libdexfile",
130 ],
131 },
132 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000133 apex_available: [
134 "com.android.art.release",
135 "com.android.art.debug",
136 ],
David Sehr82d046e2018-04-23 08:14:19 -0700137}
138
139art_cc_library {
140 name: "libprofiled",
141 defaults: [
142 "art_debug_defaults",
143 "libprofile_defaults",
144 ],
145 shared_libs: [
146 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000147 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700148 ],
David Srbecky7711c352019-04-10 17:50:12 +0100149 target: {
150 android: {
151 shared_libs: [
152 "libartbased",
153 "libdexfiled",
154 ],
155 },
156 not_windows: {
157 shared_libs: [
158 "libartbased",
159 "libdexfiled",
160 ],
161 },
162 windows: {
163 static_libs: [
164 "libartbased",
165 "libdexfiled",
166 ],
167 },
168 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000169 export_shared_lib_headers: ["libbase"],
Jiyong Park066dd9022019-12-19 02:11:59 +0000170 apex_available: [
171 "com.android.art.debug",
172 ],
David Sehr82d046e2018-04-23 08:14:19 -0700173}
174
175// For now many of these tests still use CommonRuntimeTest, almost universally because of
176// ScratchFile and related.
177// TODO: Remove CommonRuntimeTest dependency from these tests.
178art_cc_test {
179 name: "art_libprofile_tests",
180 defaults: [
181 "art_gtest_defaults",
182 ],
183 srcs: [
Nicolas Geoffraya0fc13a2019-07-23 15:48:39 +0100184 "profile/profile_boot_info_test.cc",
David Sehr82d046e2018-04-23 08:14:19 -0700185 "profile/profile_compilation_info_test.cc",
186 ],
187 shared_libs: [
188 "libartbased",
189 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -0700190 "libartbased",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000191 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700192 ],
193}