blob: 19edaef214f3d8573b63a51550fc8ff406353779 [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: [
22 "profile/profile_compilation_info.cc",
23 ],
24 target: {
25 android: {
David Sehr9d9227a2018-12-19 12:32:50 -080026 shared_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000027 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080028 "libbase",
29 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000030 static_libs: [
31 // ZipArchive support, the order matters here to get all symbols.
32 "libziparchive",
33 "libz",
34 ],
David Sehr9d9227a2018-12-19 12:32:50 -080035 export_shared_lib_headers: ["libbase"],
David Sehr82d046e2018-04-23 08:14:19 -070036 },
David Sehr9d9227a2018-12-19 12:32:50 -080037 not_windows: {
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000038 shared_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000039 "libartpalette",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000040 "libziparchive",
41 "libz",
David Sehr9d9227a2018-12-19 12:32:50 -080042 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000043 ],
David Sehr9d9227a2018-12-19 12:32:50 -080044 export_shared_lib_headers: ["libbase"],
45 },
46 windows: {
David Srbecky7711c352019-04-10 17:50:12 +010047 cflags: ["-Wno-thread-safety"],
David Sehr9d9227a2018-12-19 12:32:50 -080048 static_libs: [
Orion Hodson119733d2019-01-30 15:14:41 +000049 "libartpalette",
David Sehr9d9227a2018-12-19 12:32:50 -080050 "libziparchive",
51 "libz",
52 "libbase",
53 ],
54 export_static_lib_headers: ["libbase"],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000055 },
David Srbeckyd53f6062019-03-22 14:55:21 +000056 darwin: {
57 enabled: true,
58 },
David Sehr82d046e2018-04-23 08:14:19 -070059 },
Mathieu Chartier818cb802018-05-11 05:30:16 +000060 //generated_sources: ["art_libartbase_operator_srcs"],
David Sehr82d046e2018-04-23 08:14:19 -070061 cflags: ["-DBUILDING_LIBART=1"],
David Sehr82d046e2018-04-23 08:14:19 -070062 export_include_dirs: ["."],
63 // ART's macros.h depends on libbase's macros.h.
64 // Note: runtime_options.h depends on cmdline. But we don't really want to export this
65 // generically. dex2oat takes care of it itself.
David Sehr82d046e2018-04-23 08:14:19 -070066}
67
Andreas Gampeec5ed062018-01-26 16:20:02 -080068cc_defaults {
69 name: "libprofile_static_base_defaults",
70 static_libs: [
71 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000072 "libz",
73 "libziparchive",
Andreas Gampeec5ed062018-01-26 16:20:02 -080074 ],
75}
76
77cc_defaults {
78 name: "libprofile_static_defaults",
79 defaults: [
80 "libprofile_static_base_defaults",
81 "libartbase_static_defaults",
82 "libdexfile_static_defaults",
83 ],
84 static_libs: ["libprofile"],
85}
86
87cc_defaults {
88 name: "libprofiled_static_defaults",
89 defaults: [
90 "libprofile_static_base_defaults",
91 "libartbased_static_defaults",
92 "libdexfiled_static_defaults",
93 ],
94 static_libs: ["libprofiled"],
95}
96
David Sehr82d046e2018-04-23 08:14:19 -070097art_cc_library {
98 name: "libprofile",
99 defaults: ["libprofile_defaults"],
100 // Leave the symbols in the shared library so that stack unwinders can
101 // produce meaningful name resolution.
102 strip: {
103 keep_symbols: true,
104 },
105 shared_libs: [
106 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000107 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700108 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000109 export_shared_lib_headers: ["libbase"],
David Sehr9d9227a2018-12-19 12:32:50 -0800110 target: {
David Srbecky7711c352019-04-10 17:50:12 +0100111 android: {
112 shared_libs: [
113 "libartbase",
114 "libdexfile",
115 ],
116 },
117 not_windows: {
118 shared_libs: [
119 "libartbase",
120 "libdexfile",
121 ],
122 },
David Sehr9d9227a2018-12-19 12:32:50 -0800123 windows: {
David Srbecky7711c352019-04-10 17:50:12 +0100124 enabled: true,
125 shared: {
126 enabled: false,
127 },
128 static_libs: [
129 "libartbase",
130 "libdexfile",
131 ],
132 },
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"],
David Sehr82d046e2018-04-23 08:14:19 -0700167}
168
169// For now many of these tests still use CommonRuntimeTest, almost universally because of
170// ScratchFile and related.
171// TODO: Remove CommonRuntimeTest dependency from these tests.
172art_cc_test {
173 name: "art_libprofile_tests",
174 defaults: [
175 "art_gtest_defaults",
176 ],
177 srcs: [
178 "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}