blob: a8d8b2f0f5f097869a84d0361bf1990a92ac5ed3 [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: {
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000026 static_libs: [
27 // ZipArchive support, the order matters here to get all symbols.
28 "libziparchive",
29 "libz",
30 ],
David Sehr82d046e2018-04-23 08:14:19 -070031 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000032 host: {
33 shared_libs: [
34 "libziparchive",
35 "libz",
36 ],
37 },
David Sehr82d046e2018-04-23 08:14:19 -070038 },
Mathieu Chartier818cb802018-05-11 05:30:16 +000039 //generated_sources: ["art_libartbase_operator_srcs"],
David Sehr82d046e2018-04-23 08:14:19 -070040 cflags: ["-DBUILDING_LIBART=1"],
41 shared_libs: [
42 "libartbase",
43 "libdexfile",
David Sehr1f010162018-05-15 08:59:32 -070044 "libartbase",
David Sehr82d046e2018-04-23 08:14:19 -070045 // For atrace.
46 "libcutils",
47 ],
48 export_include_dirs: ["."],
49 // ART's macros.h depends on libbase's macros.h.
50 // Note: runtime_options.h depends on cmdline. But we don't really want to export this
51 // generically. dex2oat takes care of it itself.
52 export_shared_lib_headers: ["libbase"],
53}
54
Andreas Gampeec5ed062018-01-26 16:20:02 -080055cc_defaults {
56 name: "libprofile_static_base_defaults",
57 static_libs: [
58 "libbase",
59 "libcutils",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000060 "libz",
61 "libziparchive",
Andreas Gampeec5ed062018-01-26 16:20:02 -080062 ],
63}
64
65cc_defaults {
66 name: "libprofile_static_defaults",
67 defaults: [
68 "libprofile_static_base_defaults",
69 "libartbase_static_defaults",
70 "libdexfile_static_defaults",
71 ],
72 static_libs: ["libprofile"],
73}
74
75cc_defaults {
76 name: "libprofiled_static_defaults",
77 defaults: [
78 "libprofile_static_base_defaults",
79 "libartbased_static_defaults",
80 "libdexfiled_static_defaults",
81 ],
82 static_libs: ["libprofiled"],
83}
84
David Sehr82d046e2018-04-23 08:14:19 -070085art_cc_library {
86 name: "libprofile",
87 defaults: ["libprofile_defaults"],
88 // Leave the symbols in the shared library so that stack unwinders can
89 // produce meaningful name resolution.
90 strip: {
91 keep_symbols: true,
92 },
93 shared_libs: [
94 "libbase",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000095 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -070096 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000097 export_shared_lib_headers: ["libbase"],
David Sehr82d046e2018-04-23 08:14:19 -070098}
99
100art_cc_library {
101 name: "libprofiled",
102 defaults: [
103 "art_debug_defaults",
104 "libprofile_defaults",
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 Sehr82d046e2018-04-23 08:14:19 -0700111}
112
113// For now many of these tests still use CommonRuntimeTest, almost universally because of
114// ScratchFile and related.
115// TODO: Remove CommonRuntimeTest dependency from these tests.
116art_cc_test {
117 name: "art_libprofile_tests",
118 defaults: [
119 "art_gtest_defaults",
120 ],
121 srcs: [
122 "profile/profile_compilation_info_test.cc",
123 ],
124 shared_libs: [
125 "libartbased",
126 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -0700127 "libartbased",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000128 "libziparchive",
David Sehr82d046e2018-04-23 08:14:19 -0700129 ],
130}