blob: 11b6576a218cb522f4556090f51bf8d971fb9438 [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",
100 defaults: ["libprofile_defaults"],
101 // Leave the symbols in the shared library so that stack unwinders can
102 // produce meaningful name resolution.
103 strip: {
104 keep_symbols: true,
105 },
106 shared_libs: [
107 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000108 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700109 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000110 export_shared_lib_headers: ["libbase"],
David Sehr9d9227a2018-12-19 12:32:50 -0800111 target: {
David Srbecky7711c352019-04-10 17:50:12 +0100112 android: {
113 shared_libs: [
114 "libartbase",
115 "libdexfile",
116 ],
117 },
118 not_windows: {
119 shared_libs: [
120 "libartbase",
121 "libdexfile",
122 ],
123 },
David Sehr9d9227a2018-12-19 12:32:50 -0800124 windows: {
David Srbecky7711c352019-04-10 17:50:12 +0100125 enabled: true,
126 shared: {
127 enabled: false,
128 },
129 static_libs: [
130 "libartbase",
131 "libdexfile",
132 ],
133 },
134 },
David Sehr82d046e2018-04-23 08:14:19 -0700135}
136
137art_cc_library {
138 name: "libprofiled",
139 defaults: [
140 "art_debug_defaults",
141 "libprofile_defaults",
142 ],
143 shared_libs: [
144 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000145 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700146 ],
David Srbecky7711c352019-04-10 17:50:12 +0100147 target: {
148 android: {
149 shared_libs: [
150 "libartbased",
151 "libdexfiled",
152 ],
153 },
154 not_windows: {
155 shared_libs: [
156 "libartbased",
157 "libdexfiled",
158 ],
159 },
160 windows: {
161 static_libs: [
162 "libartbased",
163 "libdexfiled",
164 ],
165 },
166 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000167 export_shared_lib_headers: ["libbase"],
David Sehr82d046e2018-04-23 08:14:19 -0700168}
169
170// For now many of these tests still use CommonRuntimeTest, almost universally because of
171// ScratchFile and related.
172// TODO: Remove CommonRuntimeTest dependency from these tests.
173art_cc_test {
174 name: "art_libprofile_tests",
175 defaults: [
176 "art_gtest_defaults",
177 ],
178 srcs: [
Nicolas Geoffraya0fc13a2019-07-23 15:48:39 +0100179 "profile/profile_boot_info_test.cc",
David Sehr82d046e2018-04-23 08:14:19 -0700180 "profile/profile_compilation_info_test.cc",
181 ],
182 shared_libs: [
183 "libartbased",
184 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -0700185 "libartbased",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000186 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700187 ],
188}