| 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", |
| Steve Austin | 882ed6b | 2018-06-08 11:40:38 -0700 | [diff] [blame] | 34 | // "base/mem_map_fuchsia.cc", put in target when fuchsia supported by soong |
| 35 | "base/mem_map_unix.cc", |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 36 | "base/os_linux.cc", |
| 37 | "base/runtime_debug.cc", |
| 38 | "base/safe_copy.cc", |
| David Sehr | 1ce2b3b | 2018-04-05 11:02:03 -0700 | [diff] [blame] | 39 | "base/scoped_arena_allocator.cc", |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 40 | "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 Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 45 | "base/zip_archive.cc", |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 46 | ], |
| David Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 47 | 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 Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 66 | generated_sources: ["art_libartbase_operator_srcs"], |
| 67 | cflags: ["-DBUILDING_LIBART=1"], |
| 68 | shared_libs: [ |
| David Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 69 | "liblog", |
| 70 | // For ashmem. |
| 71 | "libcutils", |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 72 | // For common macros. |
| 73 | "libbase", |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 74 | ], |
| 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 | |
| 82 | gensrcs { |
| 83 | name: "art_libartbase_operator_srcs", |
| 84 | cmd: "$(location generate_operator_out) art/libartbase $(in) > $(out)", |
| 85 | tools: ["generate_operator_out"], |
| 86 | srcs: [ |
| David Sehr | c3e1895 | 2018-05-11 16:59:31 -0700 | [diff] [blame] | 87 | "arch/instruction_set.h", |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 88 | "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 | |
| 95 | art_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 Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 103 | shared_libs: [ |
| 104 | "libbase", |
| 105 | "libziparchive", |
| 106 | ], |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 107 | export_shared_lib_headers: ["libbase"], |
| 108 | } |
| 109 | |
| 110 | art_cc_library { |
| 111 | name: "libartbased", |
| 112 | defaults: [ |
| 113 | "art_debug_defaults", |
| 114 | "libartbase_defaults", |
| 115 | ], |
| David Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 116 | shared_libs: [ |
| 117 | "libbase", |
| 118 | "libziparchive", |
| 119 | ], |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 120 | export_shared_lib_headers: ["libbase"], |
| 121 | } |
| 122 | |
| David Sehr | d5f8de8 | 2018-04-27 14:12:03 -0700 | [diff] [blame] | 123 | art_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 Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 143 | art_cc_test { |
| 144 | name: "art_libartbase_tests", |
| 145 | defaults: [ |
| 146 | "art_gtest_defaults", |
| 147 | ], |
| 148 | srcs: [ |
| David Sehr | c3e1895 | 2018-05-11 16:59:31 -0700 | [diff] [blame] | 149 | "arch/instruction_set_test.cc", |
| David Sehr | 1ce2b3b | 2018-04-05 11:02:03 -0700 | [diff] [blame] | 150 | "base/arena_allocator_test.cc", |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 151 | "base/bit_field_test.cc", |
| David Srbecky | 68fefac | 2018-05-10 17:49:33 +0100 | [diff] [blame] | 152 | "base/bit_memory_region_test.cc", |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 153 | "base/bit_string_test.cc", |
| 154 | "base/bit_struct_test.cc", |
| David Srbecky | 052f8ca | 2018-04-26 15:42:54 +0100 | [diff] [blame] | 155 | "base/bit_table_test.cc", |
| David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 156 | "base/bit_utils_test.cc", |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 157 | "base/bit_vector_test.cc", |
| David Sehr | c3e1895 | 2018-05-11 16:59:31 -0700 | [diff] [blame] | 158 | "base/file_utils_test.cc", |
| David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 159 | "base/hash_set_test.cc", |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 160 | "base/hex_dump_test.cc", |
| 161 | "base/histogram_test.cc", |
| David Sehr | 9c4a015 | 2018-04-05 12:23:54 -0700 | [diff] [blame] | 162 | "base/indenter_test.cc", |
| David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 163 | "base/leb128_test.cc", |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 164 | "base/logging_test.cc", |
| David Sehr | 1ce2b3b | 2018-04-05 11:02:03 -0700 | [diff] [blame] | 165 | "base/memory_region_test.cc", |
| David Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 166 | "base/mem_map_test.cc", |
| David Sehr | c431b9d | 2018-03-02 12:01:51 -0800 | [diff] [blame] | 167 | "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 Sehr | 79e2607 | 2018-04-06 17:58:50 -0700 | [diff] [blame] | 175 | "base/zip_archive_test.cc", |
| David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 176 | ], |
| 177 | shared_libs: [ |
| 178 | "libbase", |
| 179 | ], |
| 180 | } |
| 181 | |
| 182 | cc_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 | } |