David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 1 | // |
| 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 Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 17 | cc_defaults { |
| 18 | name: "libartbase_defaults", |
| 19 | defaults: ["art_defaults"], |
| 20 | host_supported: true, |
| 21 | srcs: [ |
David Sehr | c3e1895 | 2018-05-11 16:59:31 -0700 | [diff] [blame] | 22 | "arch/instruction_set.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 23 | "base/allocator.cc", |
David Sehr | 1ce2b3b | 2018-04-05 11:02:03 -0700 | [diff] [blame] | 24 | "base/arena_allocator.cc", |
| 25 | "base/arena_bit_vector.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 26 | "base/bit_vector.cc", |
| 27 | "base/file_magic.cc", |
David Sehr | c3e1895 | 2018-05-11 16:59:31 -0700 | [diff] [blame] | 28 | "base/file_utils.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 29 | "base/hex_dump.cc", |
| 30 | "base/logging.cc", |
David Sehr | 1ce2b3b | 2018-04-05 11:02:03 -0700 | [diff] [blame] | 31 | "base/malloc_arena_pool.cc", |
| 32 | "base/memory_region.cc", |
David Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 33 | "base/mem_map.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 34 | "base/os_linux.cc", |
| 35 | "base/runtime_debug.cc", |
| 36 | "base/safe_copy.cc", |
David Sehr | 1ce2b3b | 2018-04-05 11:02:03 -0700 | [diff] [blame] | 37 | "base/scoped_arena_allocator.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 38 | "base/scoped_flock.cc", |
| 39 | "base/time_utils.cc", |
| 40 | "base/unix_file/fd_file.cc", |
| 41 | "base/unix_file/random_access_file_utils.cc", |
| 42 | "base/utils.cc", |
David Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 43 | "base/zip_archive.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 44 | ], |
David Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 45 | target: { |
| 46 | android: { |
| 47 | static_libs: [ |
| 48 | // ZipArchive support, the order matters here to get all symbols. |
| 49 | "libziparchive", |
| 50 | "libz", |
| 51 | ], |
| 52 | shared_libs: [ |
| 53 | // For android::FileMap used by libziparchive. |
| 54 | "libutils", |
| 55 | ], |
| 56 | }, |
| 57 | host: { |
| 58 | shared_libs: [ |
| 59 | "libziparchive", |
| 60 | "libz", |
| 61 | ], |
| 62 | }, |
| 63 | }, |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 64 | generated_sources: ["art_libartbase_operator_srcs"], |
| 65 | cflags: ["-DBUILDING_LIBART=1"], |
| 66 | shared_libs: [ |
David Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 67 | "liblog", |
| 68 | // For ashmem. |
| 69 | "libcutils", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 70 | // For common macros. |
| 71 | "libbase", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 72 | ], |
| 73 | export_include_dirs: ["."], |
| 74 | // ART's macros.h depends on libbase's macros.h. |
| 75 | // Note: runtime_options.h depends on cmdline. But we don't really want to export this |
| 76 | // generically. dex2oat takes care of it itself. |
| 77 | export_shared_lib_headers: ["libbase"], |
| 78 | } |
| 79 | |
| 80 | gensrcs { |
| 81 | name: "art_libartbase_operator_srcs", |
| 82 | cmd: "$(location generate_operator_out) art/libartbase $(in) > $(out)", |
| 83 | tools: ["generate_operator_out"], |
| 84 | srcs: [ |
David Sehr | c3e1895 | 2018-05-11 16:59:31 -0700 | [diff] [blame] | 85 | "arch/instruction_set.h", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 86 | "base/allocator.h", |
| 87 | "base/callee_save_type.h", |
| 88 | "base/unix_file/fd_file.h", |
| 89 | ], |
| 90 | output_extension: "operator_out.cc", |
| 91 | } |
| 92 | |
| 93 | art_cc_library { |
| 94 | name: "libartbase", |
| 95 | defaults: ["libartbase_defaults"], |
| 96 | // Leave the symbols in the shared library so that stack unwinders can |
| 97 | // produce meaningful name resolution. |
| 98 | strip: { |
| 99 | keep_symbols: true, |
| 100 | }, |
David Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 101 | shared_libs: [ |
| 102 | "libbase", |
| 103 | "libziparchive", |
| 104 | ], |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 105 | export_shared_lib_headers: ["libbase"], |
| 106 | } |
| 107 | |
| 108 | art_cc_library { |
| 109 | name: "libartbased", |
| 110 | defaults: [ |
| 111 | "art_debug_defaults", |
| 112 | "libartbase_defaults", |
| 113 | ], |
David Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 114 | shared_libs: [ |
| 115 | "libbase", |
| 116 | "libziparchive", |
| 117 | ], |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 118 | export_shared_lib_headers: ["libbase"], |
| 119 | } |
| 120 | |
David Sehr | d5f8de8 | 2018-04-27 14:12:03 -0700 | [diff] [blame] | 121 | art_cc_library { |
| 122 | name: "libartbase-art-gtest", |
| 123 | defaults: ["libart-gtest-defaults"], |
| 124 | srcs: [ |
| 125 | "base/common_art_test.cc", |
| 126 | ], |
| 127 | shared_libs: [ |
| 128 | "libartbased", |
| 129 | "libdexfiled", |
| 130 | "libbase", |
| 131 | "libbacktrace", |
| 132 | ], |
| 133 | header_libs: [ |
| 134 | "libnativehelper_header_only", |
| 135 | ], |
| 136 | include_dirs: [ |
| 137 | "external/icu/icu4c/source/common", |
| 138 | ], |
| 139 | } |
| 140 | |
David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 141 | art_cc_test { |
| 142 | name: "art_libartbase_tests", |
| 143 | defaults: [ |
| 144 | "art_gtest_defaults", |
| 145 | ], |
| 146 | srcs: [ |
David Sehr | c3e1895 | 2018-05-11 16:59:31 -0700 | [diff] [blame] | 147 | "arch/instruction_set_test.cc", |
David Sehr | 1ce2b3b | 2018-04-05 11:02:03 -0700 | [diff] [blame] | 148 | "base/arena_allocator_test.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 149 | "base/bit_field_test.cc", |
David Srbecky | 68fefac | 2018-05-10 17:49:33 +0100 | [diff] [blame] | 150 | "base/bit_memory_region_test.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 151 | "base/bit_string_test.cc", |
| 152 | "base/bit_struct_test.cc", |
David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 153 | "base/bit_table_test.cc", |
David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 154 | "base/bit_utils_test.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 155 | "base/bit_vector_test.cc", |
David Sehr | c3e1895 | 2018-05-11 16:59:31 -0700 | [diff] [blame] | 156 | "base/file_utils_test.cc", |
David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 157 | "base/hash_set_test.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 158 | "base/hex_dump_test.cc", |
| 159 | "base/histogram_test.cc", |
David Sehr | 9c4a015 | 2018-04-05 12:23:54 -0700 | [diff] [blame] | 160 | "base/indenter_test.cc", |
David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 161 | "base/leb128_test.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 162 | "base/logging_test.cc", |
David Sehr | 1ce2b3b | 2018-04-05 11:02:03 -0700 | [diff] [blame] | 163 | "base/memory_region_test.cc", |
David Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 164 | "base/mem_map_test.cc", |
David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 165 | "base/safe_copy_test.cc", |
| 166 | "base/scoped_flock_test.cc", |
| 167 | "base/time_utils_test.cc", |
| 168 | "base/transform_array_ref_test.cc", |
| 169 | "base/transform_iterator_test.cc", |
| 170 | "base/unix_file/fd_file_test.cc", |
| 171 | "base/utils_test.cc", |
| 172 | "base/variant_map_test.cc", |
David Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 173 | "base/zip_archive_test.cc", |
David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 174 | ], |
| 175 | shared_libs: [ |
| 176 | "libbase", |
| 177 | ], |
| 178 | } |
| 179 | |
| 180 | cc_library_headers { |
| 181 | name: "art_libartbase_headers", |
| 182 | host_supported: true, |
| 183 | export_include_dirs: ["."], |
| 184 | shared_libs: ["libbase"], |
| 185 | export_shared_lib_headers: ["libbase"], |
| 186 | } |