blob: 92a0dcfb2b0836142f131f8096aeb7807c1d5bf1 [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",
Jiyong Parkb1c8e162020-05-18 19:04:42 +090030 "libz",
David Sehr9d9227a2018-12-19 12:32:50 -080031 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000032 static_libs: [
33 // ZipArchive support, the order matters here to get all symbols.
34 "libziparchive",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000035 ],
Martin Stjernholme407d972020-09-17 01:31:10 +010036 export_shared_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h.
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 ],
Martin Stjernholme407d972020-09-17 01:31:10 +010045 export_shared_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h.
David Sehr9d9227a2018-12-19 12:32:50 -080046 },
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 ],
Martin Stjernholme407d972020-09-17 01:31:10 +010055 export_static_lib_headers: ["libbase"], // ART's macros.h depends on libbase's macros.h.
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: ["."],
David Sehr82d046e2018-04-23 08:14:19 -070064}
65
Andreas Gampeec5ed062018-01-26 16:20:02 -080066cc_defaults {
67 name: "libprofile_static_base_defaults",
Martin Stjernholm35f765b2020-09-23 00:38:38 +010068 whole_static_libs: [
Andreas Gampeec5ed062018-01-26 16:20:02 -080069 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000070 "libz",
71 "libziparchive",
Andreas Gampeec5ed062018-01-26 16:20:02 -080072 ],
73}
74
75cc_defaults {
76 name: "libprofile_static_defaults",
77 defaults: [
78 "libprofile_static_base_defaults",
79 "libartbase_static_defaults",
80 "libdexfile_static_defaults",
81 ],
Martin Stjernholm35f765b2020-09-23 00:38:38 +010082 whole_static_libs: ["libprofile"],
Andreas Gampeec5ed062018-01-26 16:20:02 -080083}
84
85cc_defaults {
86 name: "libprofiled_static_defaults",
87 defaults: [
88 "libprofile_static_base_defaults",
89 "libartbased_static_defaults",
90 "libdexfiled_static_defaults",
91 ],
Martin Stjernholm35f765b2020-09-23 00:38:38 +010092 whole_static_libs: ["libprofiled"],
Andreas Gampeec5ed062018-01-26 16:20:02 -080093}
94
David Sehr82d046e2018-04-23 08:14:19 -070095art_cc_library {
96 name: "libprofile",
Christopher Ferris0d38e852019-12-11 09:37:19 -080097 defaults: [
98 "libprofile_defaults",
99 "libart_nativeunwind_defaults",
100 ],
David Sehr82d046e2018-04-23 08:14:19 -0700101 shared_libs: [
102 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000103 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700104 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000105 export_shared_lib_headers: ["libbase"],
David Sehr9d9227a2018-12-19 12:32:50 -0800106 target: {
David Srbecky7711c352019-04-10 17:50:12 +0100107 android: {
108 shared_libs: [
109 "libartbase",
110 "libdexfile",
111 ],
112 },
113 not_windows: {
114 shared_libs: [
115 "libartbase",
116 "libdexfile",
117 ],
118 },
David Sehr9d9227a2018-12-19 12:32:50 -0800119 windows: {
David Srbecky7711c352019-04-10 17:50:12 +0100120 enabled: true,
121 shared: {
122 enabled: false,
123 },
124 static_libs: [
125 "libartbase",
126 "libdexfile",
127 ],
128 },
129 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000130 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +0100131 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +0000132 "com.android.art.debug",
133 ],
David Sehr82d046e2018-04-23 08:14:19 -0700134}
135
136art_cc_library {
137 name: "libprofiled",
138 defaults: [
139 "art_debug_defaults",
140 "libprofile_defaults",
141 ],
142 shared_libs: [
143 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000144 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700145 ],
David Srbecky7711c352019-04-10 17:50:12 +0100146 target: {
147 android: {
148 shared_libs: [
149 "libartbased",
150 "libdexfiled",
151 ],
152 },
153 not_windows: {
154 shared_libs: [
155 "libartbased",
156 "libdexfiled",
157 ],
158 },
159 windows: {
160 static_libs: [
161 "libartbased",
162 "libdexfiled",
163 ],
164 },
165 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000166 export_shared_lib_headers: ["libbase"],
Jiyong Park066dd9022019-12-19 02:11:59 +0000167 apex_available: [
168 "com.android.art.debug",
169 ],
David Sehr82d046e2018-04-23 08:14:19 -0700170}
171
172// For now many of these tests still use CommonRuntimeTest, almost universally because of
173// ScratchFile and related.
174// TODO: Remove CommonRuntimeTest dependency from these tests.
175art_cc_test {
176 name: "art_libprofile_tests",
177 defaults: [
178 "art_gtest_defaults",
179 ],
David Srbecky4a88a5a2020-05-05 16:21:57 +0100180 data: [
181 ":art-gtest-jars-ManyMethods",
182 ":art-gtest-jars-MultiDex",
183 ":art-gtest-jars-ProfileTestMultiDex",
184 ],
David Sehr82d046e2018-04-23 08:14:19 -0700185 srcs: [
Nicolas Geoffraya0fc13a2019-07-23 15:48:39 +0100186 "profile/profile_boot_info_test.cc",
David Sehr82d046e2018-04-23 08:14:19 -0700187 "profile/profile_compilation_info_test.cc",
188 ],
189 shared_libs: [
190 "libartbased",
191 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -0700192 "libartbased",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000193 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700194 ],
195}