blob: 4ee48da5e82825548a6b0694639adbd193de6a9f [file] [log] [blame]
David Sehr67bf42e2018-02-26 16:43:04 -08001//
2// Copyright (C) 2011 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
David Sehrc431b9d2018-03-02 12:01:51 -080017cc_defaults {
18 name: "libartbase_defaults",
19 defaults: ["art_defaults"],
20 host_supported: true,
21 srcs: [
David Sehrc3e18952018-05-11 16:59:31 -070022 "arch/instruction_set.cc",
David Sehrc431b9d2018-03-02 12:01:51 -080023 "base/allocator.cc",
David Sehr1ce2b3b2018-04-05 11:02:03 -070024 "base/arena_allocator.cc",
25 "base/arena_bit_vector.cc",
David Sehrc431b9d2018-03-02 12:01:51 -080026 "base/bit_vector.cc",
27 "base/file_magic.cc",
David Sehrc3e18952018-05-11 16:59:31 -070028 "base/file_utils.cc",
David Sehrc431b9d2018-03-02 12:01:51 -080029 "base/hex_dump.cc",
30 "base/logging.cc",
David Sehr1ce2b3b2018-04-05 11:02:03 -070031 "base/malloc_arena_pool.cc",
32 "base/memory_region.cc",
David Sehr79e26072018-04-06 17:58:50 -070033 "base/mem_map.cc",
Steve Austin882ed6b2018-06-08 11:40:38 -070034 // "base/mem_map_fuchsia.cc", put in target when fuchsia supported by soong
35 "base/mem_map_unix.cc",
David Sehrc431b9d2018-03-02 12:01:51 -080036 "base/os_linux.cc",
37 "base/runtime_debug.cc",
38 "base/safe_copy.cc",
David Sehr1ce2b3b2018-04-05 11:02:03 -070039 "base/scoped_arena_allocator.cc",
David Sehrc431b9d2018-03-02 12:01:51 -080040 "base/scoped_flock.cc",
41 "base/time_utils.cc",
42 "base/unix_file/fd_file.cc",
43 "base/unix_file/random_access_file_utils.cc",
44 "base/utils.cc",
David Sehr79e26072018-04-06 17:58:50 -070045 "base/zip_archive.cc",
David Sehrc431b9d2018-03-02 12:01:51 -080046 ],
David Sehr79e26072018-04-06 17:58:50 -070047 target: {
48 android: {
49 static_libs: [
50 // ZipArchive support, the order matters here to get all symbols.
51 "libziparchive",
52 "libz",
53 ],
54 shared_libs: [
55 // For android::FileMap used by libziparchive.
56 "libutils",
57 ],
58 },
59 host: {
60 shared_libs: [
61 "libziparchive",
62 "libz",
63 ],
64 },
65 },
David Sehrc431b9d2018-03-02 12:01:51 -080066 generated_sources: ["art_libartbase_operator_srcs"],
67 cflags: ["-DBUILDING_LIBART=1"],
68 shared_libs: [
David Sehr79e26072018-04-06 17:58:50 -070069 "liblog",
70 // For ashmem.
71 "libcutils",
David Sehrc431b9d2018-03-02 12:01:51 -080072 // For common macros.
73 "libbase",
David Sehrc431b9d2018-03-02 12:01:51 -080074 ],
75 export_include_dirs: ["."],
76 // ART's macros.h depends on libbase's macros.h.
77 // Note: runtime_options.h depends on cmdline. But we don't really want to export this
78 // generically. dex2oat takes care of it itself.
79 export_shared_lib_headers: ["libbase"],
80}
81
82gensrcs {
83 name: "art_libartbase_operator_srcs",
84 cmd: "$(location generate_operator_out) art/libartbase $(in) > $(out)",
85 tools: ["generate_operator_out"],
86 srcs: [
David Sehrc3e18952018-05-11 16:59:31 -070087 "arch/instruction_set.h",
David Sehrc431b9d2018-03-02 12:01:51 -080088 "base/allocator.h",
89 "base/callee_save_type.h",
90 "base/unix_file/fd_file.h",
91 ],
92 output_extension: "operator_out.cc",
93}
94
95art_cc_library {
96 name: "libartbase",
97 defaults: ["libartbase_defaults"],
98 // Leave the symbols in the shared library so that stack unwinders can
99 // produce meaningful name resolution.
100 strip: {
101 keep_symbols: true,
102 },
David Sehr79e26072018-04-06 17:58:50 -0700103 shared_libs: [
104 "libbase",
105 "libziparchive",
106 ],
David Sehrc431b9d2018-03-02 12:01:51 -0800107 export_shared_lib_headers: ["libbase"],
108}
109
110art_cc_library {
111 name: "libartbased",
112 defaults: [
113 "art_debug_defaults",
114 "libartbase_defaults",
115 ],
David Sehr79e26072018-04-06 17:58:50 -0700116 shared_libs: [
117 "libbase",
118 "libziparchive",
119 ],
David Sehrc431b9d2018-03-02 12:01:51 -0800120 export_shared_lib_headers: ["libbase"],
121}
122
David Sehrd5f8de82018-04-27 14:12:03 -0700123art_cc_library {
124 name: "libartbase-art-gtest",
125 defaults: ["libart-gtest-defaults"],
126 srcs: [
127 "base/common_art_test.cc",
128 ],
129 shared_libs: [
130 "libartbased",
131 "libdexfiled",
132 "libbase",
133 "libbacktrace",
134 ],
135 header_libs: [
136 "libnativehelper_header_only",
137 ],
138 include_dirs: [
139 "external/icu/icu4c/source/common",
140 ],
141}
142
David Sehr67bf42e2018-02-26 16:43:04 -0800143art_cc_test {
144 name: "art_libartbase_tests",
145 defaults: [
146 "art_gtest_defaults",
147 ],
148 srcs: [
David Sehrc3e18952018-05-11 16:59:31 -0700149 "arch/instruction_set_test.cc",
David Sehr1ce2b3b2018-04-05 11:02:03 -0700150 "base/arena_allocator_test.cc",
David Sehrc431b9d2018-03-02 12:01:51 -0800151 "base/bit_field_test.cc",
David Srbecky68fefac2018-05-10 17:49:33 +0100152 "base/bit_memory_region_test.cc",
David Sehrc431b9d2018-03-02 12:01:51 -0800153 "base/bit_string_test.cc",
154 "base/bit_struct_test.cc",
David Srbecky052f8ca2018-04-26 15:42:54 +0100155 "base/bit_table_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -0800156 "base/bit_utils_test.cc",
David Sehrc431b9d2018-03-02 12:01:51 -0800157 "base/bit_vector_test.cc",
David Sehrc3e18952018-05-11 16:59:31 -0700158 "base/file_utils_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -0800159 "base/hash_set_test.cc",
David Sehrc431b9d2018-03-02 12:01:51 -0800160 "base/hex_dump_test.cc",
161 "base/histogram_test.cc",
David Sehr9c4a0152018-04-05 12:23:54 -0700162 "base/indenter_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -0800163 "base/leb128_test.cc",
David Sehrc431b9d2018-03-02 12:01:51 -0800164 "base/logging_test.cc",
David Sehr1ce2b3b2018-04-05 11:02:03 -0700165 "base/memory_region_test.cc",
David Sehr79e26072018-04-06 17:58:50 -0700166 "base/mem_map_test.cc",
David Sehrc431b9d2018-03-02 12:01:51 -0800167 "base/safe_copy_test.cc",
168 "base/scoped_flock_test.cc",
169 "base/time_utils_test.cc",
170 "base/transform_array_ref_test.cc",
171 "base/transform_iterator_test.cc",
172 "base/unix_file/fd_file_test.cc",
173 "base/utils_test.cc",
174 "base/variant_map_test.cc",
David Sehr79e26072018-04-06 17:58:50 -0700175 "base/zip_archive_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -0800176 ],
177 shared_libs: [
178 "libbase",
179 ],
180}
181
182cc_library_headers {
183 name: "art_libartbase_headers",
184 host_supported: true,
185 export_include_dirs: ["."],
186 shared_libs: ["libbase"],
187 export_shared_lib_headers: ["libbase"],
188}