blob: b9883f658d346d9be0bbaf6c8aba3c43a572ec19 [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: {
26 static_libs: [
27 // ZipArchive support, the order matters here to get all symbols.
28 "libziparchive",
29 "libz",
30 ],
31 shared_libs: [
32 // For android::FileMap used by libziparchive.
33 "libutils",
34 ],
35 },
36 host: {
37 shared_libs: [
38 "libziparchive",
39 "libz",
40 ],
41 },
42 },
Mathieu Chartier818cb802018-05-11 05:30:16 +000043 //generated_sources: ["art_libartbase_operator_srcs"],
David Sehr82d046e2018-04-23 08:14:19 -070044 cflags: ["-DBUILDING_LIBART=1"],
45 shared_libs: [
46 "libartbase",
47 "libdexfile",
David Sehr1f010162018-05-15 08:59:32 -070048 "libartbase",
David Sehr82d046e2018-04-23 08:14:19 -070049 // For atrace.
50 "libcutils",
51 ],
52 export_include_dirs: ["."],
53 // ART's macros.h depends on libbase's macros.h.
54 // Note: runtime_options.h depends on cmdline. But we don't really want to export this
55 // generically. dex2oat takes care of it itself.
56 export_shared_lib_headers: ["libbase"],
57}
58
59art_cc_library {
60 name: "libprofile",
61 defaults: ["libprofile_defaults"],
62 // Leave the symbols in the shared library so that stack unwinders can
63 // produce meaningful name resolution.
64 strip: {
65 keep_symbols: true,
66 },
67 shared_libs: [
68 "libbase",
69 "libziparchive",
70 ],
71 export_shared_lib_headers: ["libbase"],
72}
73
74art_cc_library {
75 name: "libprofiled",
76 defaults: [
77 "art_debug_defaults",
78 "libprofile_defaults",
79 ],
80 shared_libs: [
81 "libbase",
82 "libziparchive",
83 ],
84 export_shared_lib_headers: ["libbase"],
85}
86
87// For now many of these tests still use CommonRuntimeTest, almost universally because of
88// ScratchFile and related.
89// TODO: Remove CommonRuntimeTest dependency from these tests.
90art_cc_test {
91 name: "art_libprofile_tests",
92 defaults: [
93 "art_gtest_defaults",
94 ],
95 srcs: [
96 "profile/profile_compilation_info_test.cc",
97 ],
98 shared_libs: [
99 "libartbased",
100 "libdexfiled",
David Sehr1f010162018-05-15 08:59:32 -0700101 "libartbased",
David Sehr82d046e2018-04-23 08:14:19 -0700102 "libziparchive",
103 ],
104}