blob: e68c2fba5b0b1cf36de57a0306248d9bfd37a43e [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: [
22 "base/allocator.cc",
David Sehr1ce2b3b2018-04-05 11:02:03 -070023 "base/arena_allocator.cc",
24 "base/arena_bit_vector.cc",
David Sehrc431b9d2018-03-02 12:01:51 -080025 "base/bit_vector.cc",
26 "base/file_magic.cc",
27 "base/hex_dump.cc",
28 "base/logging.cc",
David Sehr1ce2b3b2018-04-05 11:02:03 -070029 "base/malloc_arena_pool.cc",
30 "base/memory_region.cc",
David Sehrc431b9d2018-03-02 12:01:51 -080031 "base/os_linux.cc",
32 "base/runtime_debug.cc",
33 "base/safe_copy.cc",
David Sehr1ce2b3b2018-04-05 11:02:03 -070034 "base/scoped_arena_allocator.cc",
David Sehrc431b9d2018-03-02 12:01:51 -080035 "base/scoped_flock.cc",
36 "base/time_utils.cc",
37 "base/unix_file/fd_file.cc",
38 "base/unix_file/random_access_file_utils.cc",
39 "base/utils.cc",
40 ],
41 generated_sources: ["art_libartbase_operator_srcs"],
42 cflags: ["-DBUILDING_LIBART=1"],
43 shared_libs: [
44 // For common macros.
45 "libbase",
46 "liblog",
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
55gensrcs {
56 name: "art_libartbase_operator_srcs",
57 cmd: "$(location generate_operator_out) art/libartbase $(in) > $(out)",
58 tools: ["generate_operator_out"],
59 srcs: [
60 "base/allocator.h",
61 "base/callee_save_type.h",
62 "base/unix_file/fd_file.h",
63 ],
64 output_extension: "operator_out.cc",
65}
66
67art_cc_library {
68 name: "libartbase",
69 defaults: ["libartbase_defaults"],
70 // Leave the symbols in the shared library so that stack unwinders can
71 // produce meaningful name resolution.
72 strip: {
73 keep_symbols: true,
74 },
75 shared_libs: ["libbase"],
76 export_shared_lib_headers: ["libbase"],
77}
78
79art_cc_library {
80 name: "libartbased",
81 defaults: [
82 "art_debug_defaults",
83 "libartbase_defaults",
84 ],
85 shared_libs: ["libbase"],
86 export_shared_lib_headers: ["libbase"],
87}
88
89// For now many of these tests still use CommonRuntimeTest, almost universally because of
90// ScratchFile and related.
91// TODO: Remove CommonRuntimeTest dependency from these tests.
David Sehr67bf42e2018-02-26 16:43:04 -080092art_cc_test {
93 name: "art_libartbase_tests",
94 defaults: [
95 "art_gtest_defaults",
96 ],
97 srcs: [
David Sehr1ce2b3b2018-04-05 11:02:03 -070098 "base/arena_allocator_test.cc",
David Sehrc431b9d2018-03-02 12:01:51 -080099 "base/bit_field_test.cc",
100 "base/bit_string_test.cc",
101 "base/bit_struct_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -0800102 "base/bit_utils_test.cc",
David Sehrc431b9d2018-03-02 12:01:51 -0800103 "base/bit_vector_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -0800104 "base/hash_set_test.cc",
David Sehrc431b9d2018-03-02 12:01:51 -0800105 "base/hex_dump_test.cc",
106 "base/histogram_test.cc",
David Sehr9c4a0152018-04-05 12:23:54 -0700107 "base/indenter_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -0800108 "base/leb128_test.cc",
David Sehrc431b9d2018-03-02 12:01:51 -0800109 "base/logging_test.cc",
David Sehr1ce2b3b2018-04-05 11:02:03 -0700110 "base/memory_region_test.cc",
David Sehrc431b9d2018-03-02 12:01:51 -0800111 "base/safe_copy_test.cc",
112 "base/scoped_flock_test.cc",
113 "base/time_utils_test.cc",
114 "base/transform_array_ref_test.cc",
115 "base/transform_iterator_test.cc",
116 "base/unix_file/fd_file_test.cc",
117 "base/utils_test.cc",
118 "base/variant_map_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -0800119 ],
120 shared_libs: [
121 "libbase",
122 ],
123}
124
125cc_library_headers {
126 name: "art_libartbase_headers",
127 host_supported: true,
128 export_include_dirs: ["."],
129 shared_libs: ["libbase"],
130 export_shared_lib_headers: ["libbase"],
131}