blob: 3c619444770f8905eba5f7a49434bb628153af14 [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 Sehr8f4b0562018-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",
23 "base/bit_vector.cc",
24 "base/file_magic.cc",
25 "base/hex_dump.cc",
26 "base/logging.cc",
27 "base/os_linux.cc",
28 "base/runtime_debug.cc",
29 "base/safe_copy.cc",
30 "base/scoped_flock.cc",
31 "base/time_utils.cc",
32 "base/unix_file/fd_file.cc",
33 "base/unix_file/random_access_file_utils.cc",
34 "base/utils.cc",
35 ],
36 generated_sources: ["art_libartbase_operator_srcs"],
37 cflags: ["-DBUILDING_LIBART=1"],
38 shared_libs: [
39 // For common macros.
40 "libbase",
41 "liblog",
42 ],
43 export_include_dirs: ["."],
44 // ART's macros.h depends on libbase's macros.h.
45 // Note: runtime_options.h depends on cmdline. But we don't really want to export this
46 // generically. dex2oat takes care of it itself.
47 export_shared_lib_headers: ["libbase"],
48}
49
50gensrcs {
51 name: "art_libartbase_operator_srcs",
52 cmd: "$(location generate_operator_out) art/libartbase $(in) > $(out)",
53 tools: ["generate_operator_out"],
54 srcs: [
55 "base/allocator.h",
56 "base/callee_save_type.h",
57 "base/unix_file/fd_file.h",
58 ],
59 output_extension: "operator_out.cc",
60}
61
62art_cc_library {
63 name: "libartbase",
64 defaults: ["libartbase_defaults"],
65 // Leave the symbols in the shared library so that stack unwinders can
66 // produce meaningful name resolution.
67 strip: {
68 keep_symbols: true,
69 },
70 shared_libs: ["libbase"],
71 export_shared_lib_headers: ["libbase"],
72}
73
74art_cc_library {
75 name: "libartbased",
76 defaults: [
77 "art_debug_defaults",
78 "libartbase_defaults",
79 ],
80 shared_libs: ["libbase"],
81 export_shared_lib_headers: ["libbase"],
82}
83
84// For now many of these tests still use CommonRuntimeTest, almost universally because of
85// ScratchFile and related.
86// TODO: Remove CommonRuntimeTest dependency from these tests.
David Sehr67bf42e2018-02-26 16:43:04 -080087art_cc_test {
88 name: "art_libartbase_tests",
89 defaults: [
90 "art_gtest_defaults",
91 ],
92 srcs: [
David Sehr8f4b0562018-03-02 12:01:51 -080093 "base/bit_field_test.cc",
94 "base/bit_string_test.cc",
95 "base/bit_struct_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -080096 "base/bit_utils_test.cc",
David Sehr8f4b0562018-03-02 12:01:51 -080097 "base/bit_vector_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -080098 "base/hash_set_test.cc",
David Sehr8f4b0562018-03-02 12:01:51 -080099 "base/hex_dump_test.cc",
100 "base/histogram_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -0800101 "base/leb128_test.cc",
David Sehr8f4b0562018-03-02 12:01:51 -0800102 "base/logging_test.cc",
103 "base/safe_copy_test.cc",
104 "base/scoped_flock_test.cc",
105 "base/time_utils_test.cc",
106 "base/transform_array_ref_test.cc",
107 "base/transform_iterator_test.cc",
108 "base/unix_file/fd_file_test.cc",
109 "base/utils_test.cc",
110 "base/variant_map_test.cc",
David Sehr67bf42e2018-02-26 16:43:04 -0800111 ],
112 shared_libs: [
113 "libbase",
114 ],
115}
116
117cc_library_headers {
118 name: "art_libartbase_headers",
119 host_supported: true,
120 export_include_dirs: ["."],
121 shared_libs: ["libbase"],
122 export_shared_lib_headers: ["libbase"],
123}