blob: 1742a978f6ebf36865d876c738e2a4c4b4df0fe9 [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 },
David Sehr82d046e2018-04-23 08:14:19 -0700133}
134
135art_cc_library {
136 name: "libprofiled",
137 defaults: [
138 "art_debug_defaults",
139 "libprofile_defaults",
140 ],
141 shared_libs: [
142 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000143 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700144 ],
David Srbecky7711c352019-04-10 17:50:12 +0100145 target: {
146 android: {
147 shared_libs: [
148 "libartbased",
149 "libdexfiled",
150 ],
151 },
152 not_windows: {
153 shared_libs: [
154 "libartbased",
155 "libdexfiled",
156 ],
157 },
158 windows: {
159 static_libs: [
160 "libartbased",
161 "libdexfiled",
162 ],
163 },
164 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000165 export_shared_lib_headers: ["libbase"],
David Sehr82d046e2018-04-23 08:14:19 -0700166}
167
168// For now many of these tests still use CommonRuntimeTest, almost universally because of
169// ScratchFile and related.
170// TODO: Remove CommonRuntimeTest dependency from these tests.
171art_cc_test {
172 name: "art_libprofile_tests",
173 defaults: [
174 "art_gtest_defaults",
175 ],
176 srcs: [
Nicolas Geoffraya0fc13a2019-07-23 15:48:39 +0100177 "profile/profile_boot_info_test.cc",
David Sehr82d046e2018-04-23 08:14:19 -0700178 "profile/profile_compilation_info_test.cc",
179 ],
180 shared_libs: [
181 "libartbased",
182 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -0700183 "libartbased",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000184 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700185 ],
186}