Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [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 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 19 | include art/build/Android.common_build.mk |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 20 | |
| 21 | LIBART_COMMON_SRC_FILES := \ |
Mathieu Chartier | c785344 | 2015-03-27 14:35:38 -0700 | [diff] [blame] | 22 | art_field.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 23 | atomic.cc.arm \ |
| 24 | barrier.cc \ |
| 25 | base/allocator.cc \ |
Mathieu Chartier | b666f48 | 2015-02-18 14:33:14 -0800 | [diff] [blame] | 26 | base/arena_allocator.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 27 | base/bit_vector.cc \ |
| 28 | base/hex_dump.cc \ |
| 29 | base/logging.cc \ |
| 30 | base/mutex.cc \ |
Mathieu Chartier | b666f48 | 2015-02-18 14:33:14 -0800 | [diff] [blame] | 31 | base/scoped_arena_allocator.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 32 | base/scoped_flock.cc \ |
| 33 | base/stringpiece.cc \ |
| 34 | base/stringprintf.cc \ |
Vladimir Marko | 41b175a | 2015-05-19 18:08:00 +0100 | [diff] [blame] | 35 | base/time_utils.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 36 | base/timing_logger.cc \ |
| 37 | base/unix_file/fd_file.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 38 | base/unix_file/random_access_file_utils.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 39 | check_jni.cc \ |
| 40 | class_linker.cc \ |
| 41 | common_throws.cc \ |
| 42 | debugger.cc \ |
| 43 | dex_file.cc \ |
| 44 | dex_file_verifier.cc \ |
| 45 | dex_instruction.cc \ |
| 46 | elf_file.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 47 | gc/allocator/dlmalloc.cc \ |
| 48 | gc/allocator/rosalloc.cc \ |
Mathieu Chartier | 4858a93 | 2015-01-23 13:18:53 -0800 | [diff] [blame] | 49 | gc/accounting/bitmap.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 50 | gc/accounting/card_table.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 51 | gc/accounting/heap_bitmap.cc \ |
| 52 | gc/accounting/mod_union_table.cc \ |
| 53 | gc/accounting/remembered_set.cc \ |
| 54 | gc/accounting/space_bitmap.cc \ |
| 55 | gc/collector/concurrent_copying.cc \ |
| 56 | gc/collector/garbage_collector.cc \ |
| 57 | gc/collector/immune_region.cc \ |
| 58 | gc/collector/mark_compact.cc \ |
| 59 | gc/collector/mark_sweep.cc \ |
| 60 | gc/collector/partial_mark_sweep.cc \ |
| 61 | gc/collector/semi_space.cc \ |
| 62 | gc/collector/sticky_mark_sweep.cc \ |
| 63 | gc/gc_cause.cc \ |
| 64 | gc/heap.cc \ |
| 65 | gc/reference_processor.cc \ |
| 66 | gc/reference_queue.cc \ |
| 67 | gc/space/bump_pointer_space.cc \ |
| 68 | gc/space/dlmalloc_space.cc \ |
| 69 | gc/space/image_space.cc \ |
| 70 | gc/space/large_object_space.cc \ |
| 71 | gc/space/malloc_space.cc \ |
Hiroshi Yamauchi | 2cd334a | 2015-01-09 14:03:35 -0800 | [diff] [blame] | 72 | gc/space/region_space.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 73 | gc/space/rosalloc_space.cc \ |
| 74 | gc/space/space.cc \ |
| 75 | gc/space/zygote_space.cc \ |
Mathieu Chartier | a5eae69 | 2014-12-17 17:56:03 -0800 | [diff] [blame] | 76 | gc/task_processor.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 77 | hprof/hprof.cc \ |
| 78 | image.cc \ |
| 79 | indirect_reference_table.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 80 | instrumentation.cc \ |
| 81 | intern_table.cc \ |
| 82 | interpreter/interpreter.cc \ |
| 83 | interpreter/interpreter_common.cc \ |
Colin Cross | e84e4f7 | 2015-03-18 14:01:19 -0700 | [diff] [blame] | 84 | interpreter/interpreter_goto_table_impl.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 85 | interpreter/interpreter_switch_impl.cc \ |
Andreas Gampe | 2969bcd | 2015-03-09 12:57:41 -0700 | [diff] [blame] | 86 | interpreter/unstarted_runtime.cc \ |
Ian Rogers | 68d8b42 | 2014-07-17 11:09:10 -0700 | [diff] [blame] | 87 | java_vm_ext.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 88 | jdwp/jdwp_event.cc \ |
| 89 | jdwp/jdwp_expand_buf.cc \ |
| 90 | jdwp/jdwp_handler.cc \ |
| 91 | jdwp/jdwp_main.cc \ |
| 92 | jdwp/jdwp_request.cc \ |
| 93 | jdwp/jdwp_socket.cc \ |
| 94 | jdwp/object_registry.cc \ |
Ian Rogers | 68d8b42 | 2014-07-17 11:09:10 -0700 | [diff] [blame] | 95 | jni_env_ext.cc \ |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 96 | jit/jit.cc \ |
| 97 | jit/jit_code_cache.cc \ |
| 98 | jit/jit_instrumentation.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 99 | jni_internal.cc \ |
| 100 | jobject_comparator.cc \ |
Mathieu Chartier | c785344 | 2015-03-27 14:35:38 -0700 | [diff] [blame] | 101 | linear_alloc.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 102 | mem_map.cc \ |
| 103 | memory_region.cc \ |
Mathieu Chartier | fc58af4 | 2015-04-16 18:00:39 -0700 | [diff] [blame] | 104 | mirror/abstract_method.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 105 | mirror/art_method.cc \ |
| 106 | mirror/array.cc \ |
| 107 | mirror/class.cc \ |
| 108 | mirror/dex_cache.cc \ |
Mathieu Chartier | daaf326 | 2015-03-24 13:30:28 -0700 | [diff] [blame] | 109 | mirror/field.cc \ |
Mathieu Chartier | fc58af4 | 2015-04-16 18:00:39 -0700 | [diff] [blame] | 110 | mirror/method.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 111 | mirror/object.cc \ |
| 112 | mirror/reference.cc \ |
| 113 | mirror/stack_trace_element.cc \ |
| 114 | mirror/string.cc \ |
| 115 | mirror/throwable.cc \ |
| 116 | monitor.cc \ |
Calin Juravle | c842352 | 2014-08-12 20:55:20 +0100 | [diff] [blame] | 117 | native_bridge_art_interface.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 118 | native/dalvik_system_DexFile.cc \ |
| 119 | native/dalvik_system_VMDebug.cc \ |
| 120 | native/dalvik_system_VMRuntime.cc \ |
| 121 | native/dalvik_system_VMStack.cc \ |
| 122 | native/dalvik_system_ZygoteHooks.cc \ |
| 123 | native/java_lang_Class.cc \ |
| 124 | native/java_lang_DexCache.cc \ |
| 125 | native/java_lang_Object.cc \ |
| 126 | native/java_lang_Runtime.cc \ |
| 127 | native/java_lang_String.cc \ |
Jeff Hao | 848f70a | 2014-01-15 13:49:50 -0800 | [diff] [blame] | 128 | native/java_lang_StringFactory.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 129 | native/java_lang_System.cc \ |
| 130 | native/java_lang_Thread.cc \ |
| 131 | native/java_lang_Throwable.cc \ |
| 132 | native/java_lang_VMClassLoader.cc \ |
Mathieu Chartier | a5a53ef | 2014-09-12 12:58:05 -0700 | [diff] [blame] | 133 | native/java_lang_ref_FinalizerReference.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 134 | native/java_lang_ref_Reference.cc \ |
| 135 | native/java_lang_reflect_Array.cc \ |
| 136 | native/java_lang_reflect_Constructor.cc \ |
| 137 | native/java_lang_reflect_Field.cc \ |
| 138 | native/java_lang_reflect_Method.cc \ |
| 139 | native/java_lang_reflect_Proxy.cc \ |
| 140 | native/java_util_concurrent_atomic_AtomicLong.cc \ |
Jeff Hao | 848f70a | 2014-01-15 13:49:50 -0800 | [diff] [blame] | 141 | native/libcore_util_CharsetUtils.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 142 | native/org_apache_harmony_dalvik_ddmc_DdmServer.cc \ |
| 143 | native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc \ |
| 144 | native/sun_misc_Unsafe.cc \ |
| 145 | oat.cc \ |
| 146 | oat_file.cc \ |
Richard Uhler | 66d874d | 2015-01-15 09:37:19 -0800 | [diff] [blame] | 147 | oat_file_assistant.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 148 | object_lock.cc \ |
| 149 | offsets.cc \ |
| 150 | os_linux.cc \ |
| 151 | parsed_options.cc \ |
| 152 | primitive.cc \ |
| 153 | quick_exception_handler.cc \ |
| 154 | quick/inline_method_analyser.cc \ |
| 155 | reference_table.cc \ |
| 156 | reflection.cc \ |
| 157 | runtime.cc \ |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 158 | runtime_options.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 159 | signal_catcher.cc \ |
| 160 | stack.cc \ |
Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 161 | stack_map.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 162 | thread.cc \ |
| 163 | thread_list.cc \ |
| 164 | thread_pool.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 165 | trace.cc \ |
| 166 | transaction.cc \ |
| 167 | profiler.cc \ |
| 168 | fault_handler.cc \ |
| 169 | utf.cc \ |
| 170 | utils.cc \ |
| 171 | verifier/dex_gc_map.cc \ |
| 172 | verifier/instruction_flags.cc \ |
| 173 | verifier/method_verifier.cc \ |
| 174 | verifier/reg_type.cc \ |
| 175 | verifier/reg_type_cache.cc \ |
| 176 | verifier/register_line.cc \ |
| 177 | well_known_classes.cc \ |
| 178 | zip_archive.cc |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 179 | |
| 180 | LIBART_COMMON_SRC_FILES += \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 181 | arch/context.cc \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 182 | arch/instruction_set.cc \ |
| 183 | arch/instruction_set_features.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 184 | arch/memcmp16.cc \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 185 | arch/arm/instruction_set_features_arm.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 186 | arch/arm/registers_arm.cc \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 187 | arch/arm64/instruction_set_features_arm64.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 188 | arch/arm64/registers_arm64.cc \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 189 | arch/mips/instruction_set_features_mips.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 190 | arch/mips/registers_mips.cc \ |
Andreas Gampe | 57b3429 | 2015-01-14 15:45:59 -0800 | [diff] [blame] | 191 | arch/mips64/instruction_set_features_mips64.cc \ |
| 192 | arch/mips64/registers_mips64.cc \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 193 | arch/x86/instruction_set_features_x86.cc \ |
| 194 | arch/x86/registers_x86.cc \ |
| 195 | arch/x86_64/registers_x86_64.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 196 | entrypoints/entrypoint_utils.cc \ |
| 197 | entrypoints/interpreter/interpreter_entrypoints.cc \ |
| 198 | entrypoints/jni/jni_entrypoints.cc \ |
| 199 | entrypoints/math_entrypoints.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 200 | entrypoints/quick/quick_alloc_entrypoints.cc \ |
| 201 | entrypoints/quick/quick_cast_entrypoints.cc \ |
| 202 | entrypoints/quick/quick_deoptimization_entrypoints.cc \ |
| 203 | entrypoints/quick/quick_dexcache_entrypoints.cc \ |
| 204 | entrypoints/quick/quick_field_entrypoints.cc \ |
| 205 | entrypoints/quick/quick_fillarray_entrypoints.cc \ |
| 206 | entrypoints/quick/quick_instrumentation_entrypoints.cc \ |
| 207 | entrypoints/quick/quick_jni_entrypoints.cc \ |
| 208 | entrypoints/quick/quick_lock_entrypoints.cc \ |
| 209 | entrypoints/quick/quick_math_entrypoints.cc \ |
| 210 | entrypoints/quick/quick_thread_entrypoints.cc \ |
| 211 | entrypoints/quick/quick_throw_entrypoints.cc \ |
| 212 | entrypoints/quick/quick_trampoline_entrypoints.cc |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 213 | |
Elliott Hughes | 7ac7e32 | 2014-06-27 17:20:59 -0700 | [diff] [blame] | 214 | LIBART_TARGET_LDFLAGS := |
Ian Rogers | c5f1773 | 2014-06-05 20:48:42 -0700 | [diff] [blame] | 215 | LIBART_HOST_LDFLAGS := |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 216 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 217 | LIBART_TARGET_SRC_FILES := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 218 | $(LIBART_COMMON_SRC_FILES) \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 219 | jdwp/jdwp_adb.cc \ |
| 220 | monitor_android.cc \ |
| 221 | runtime_android.cc \ |
| 222 | thread_android.cc |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 223 | |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 224 | LIBART_TARGET_SRC_FILES_arm := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 225 | arch/arm/context_arm.cc.arm \ |
| 226 | arch/arm/entrypoints_init_arm.cc \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 227 | arch/arm/instruction_set_features_assembly_tests.S \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 228 | arch/arm/jni_entrypoints_arm.S \ |
| 229 | arch/arm/memcmp16_arm.S \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 230 | arch/arm/quick_entrypoints_arm.S \ |
Zheng Xu | 5667fdb | 2014-10-23 18:29:55 +0800 | [diff] [blame] | 231 | arch/arm/quick_entrypoints_cc_arm.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 232 | arch/arm/thread_arm.cc \ |
| 233 | arch/arm/fault_handler_arm.cc |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 234 | |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 235 | LIBART_TARGET_SRC_FILES_arm64 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 236 | arch/arm64/context_arm64.cc \ |
| 237 | arch/arm64/entrypoints_init_arm64.cc \ |
| 238 | arch/arm64/jni_entrypoints_arm64.S \ |
| 239 | arch/arm64/memcmp16_arm64.S \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 240 | arch/arm64/quick_entrypoints_arm64.S \ |
| 241 | arch/arm64/thread_arm64.cc \ |
| 242 | monitor_pool.cc \ |
| 243 | arch/arm64/fault_handler_arm64.cc |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 244 | |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 245 | LIBART_SRC_FILES_x86 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 246 | arch/x86/context_x86.cc \ |
| 247 | arch/x86/entrypoints_init_x86.cc \ |
| 248 | arch/x86/jni_entrypoints_x86.S \ |
Alexander Ivchenko | 907194a | 2014-07-14 18:54:34 +0400 | [diff] [blame] | 249 | arch/x86/memcmp16_x86.S \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 250 | arch/x86/quick_entrypoints_x86.S \ |
| 251 | arch/x86/thread_x86.cc \ |
| 252 | arch/x86/fault_handler_x86.cc |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 253 | |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 254 | LIBART_TARGET_SRC_FILES_x86 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 255 | $(LIBART_SRC_FILES_x86) |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 256 | |
Dave Allison | dfd3b47 | 2014-07-16 16:04:32 -0700 | [diff] [blame] | 257 | # Note that the fault_handler_x86.cc is not a mistake. This file is |
| 258 | # shared between the x86 and x86_64 architectures. |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 259 | LIBART_SRC_FILES_x86_64 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 260 | arch/x86_64/context_x86_64.cc \ |
| 261 | arch/x86_64/entrypoints_init_x86_64.cc \ |
| 262 | arch/x86_64/jni_entrypoints_x86_64.S \ |
Varvara Rainchik | 2a0bffd | 2014-07-30 17:01:24 +0400 | [diff] [blame] | 263 | arch/x86_64/memcmp16_x86_64.S \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 264 | arch/x86_64/quick_entrypoints_x86_64.S \ |
| 265 | arch/x86_64/thread_x86_64.cc \ |
| 266 | monitor_pool.cc \ |
Dave Allison | dfd3b47 | 2014-07-16 16:04:32 -0700 | [diff] [blame] | 267 | arch/x86/fault_handler_x86.cc |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 268 | |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 269 | LIBART_TARGET_SRC_FILES_x86_64 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 270 | $(LIBART_SRC_FILES_x86_64) \ |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 271 | |
| 272 | LIBART_TARGET_SRC_FILES_mips := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 273 | arch/mips/context_mips.cc \ |
| 274 | arch/mips/entrypoints_init_mips.cc \ |
| 275 | arch/mips/jni_entrypoints_mips.S \ |
| 276 | arch/mips/memcmp16_mips.S \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 277 | arch/mips/quick_entrypoints_mips.S \ |
| 278 | arch/mips/thread_mips.cc \ |
| 279 | arch/mips/fault_handler_mips.cc |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 280 | |
Andreas Gampe | 1a5c406 | 2015-01-15 12:10:47 -0800 | [diff] [blame] | 281 | LIBART_TARGET_SRC_FILES_mips64 := \ |
| 282 | arch/mips64/context_mips64.cc \ |
| 283 | arch/mips64/entrypoints_init_mips64.cc \ |
| 284 | arch/mips64/jni_entrypoints_mips64.S \ |
| 285 | arch/mips64/memcmp16_mips64.S \ |
| 286 | arch/mips64/quick_entrypoints_mips64.S \ |
| 287 | arch/mips64/thread_mips64.cc \ |
| 288 | monitor_pool.cc \ |
| 289 | arch/mips64/fault_handler_mips64.cc |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 290 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 291 | LIBART_HOST_SRC_FILES := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 292 | $(LIBART_COMMON_SRC_FILES) \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 293 | monitor_linux.cc \ |
| 294 | runtime_linux.cc \ |
| 295 | thread_linux.cc |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 296 | |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 297 | LIBART_HOST_SRC_FILES_32 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 298 | $(LIBART_SRC_FILES_x86) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 299 | |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 300 | LIBART_HOST_SRC_FILES_64 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 301 | $(LIBART_SRC_FILES_x86_64) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 302 | |
| 303 | LIBART_ENUM_OPERATOR_OUT_HEADER_FILES := \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 304 | arch/instruction_set.h \ |
Mathieu Chartier | bad0267 | 2014-08-25 13:08:22 -0700 | [diff] [blame] | 305 | base/allocator.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 306 | base/mutex.h \ |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 307 | debugger.h \ |
Andreas Gampe | 4303ba9 | 2014-11-06 01:00:46 -0800 | [diff] [blame] | 308 | base/unix_file/fd_file.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 309 | dex_file.h \ |
| 310 | dex_instruction.h \ |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 311 | dex_instruction_utils.h \ |
Mathieu Chartier | e34fa1d | 2015-01-14 14:55:47 -0800 | [diff] [blame] | 312 | gc_root.h \ |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 313 | gc/allocator/rosalloc.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 314 | gc/collector/gc_type.h \ |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 315 | gc/allocator_type.h \ |
Mathieu Chartier | b363f66 | 2014-07-16 13:28:58 -0700 | [diff] [blame] | 316 | gc/collector_type.h \ |
Hiroshi Yamauchi | d25f842 | 2015-01-30 16:25:12 -0800 | [diff] [blame] | 317 | gc/space/region_space.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 318 | gc/space/space.h \ |
| 319 | gc/heap.h \ |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 320 | instrumentation.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 321 | indirect_reference_table.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 322 | invoke_type.h \ |
| 323 | jdwp/jdwp.h \ |
| 324 | jdwp/jdwp_constants.h \ |
| 325 | lock_word.h \ |
| 326 | mirror/class.h \ |
| 327 | oat.h \ |
| 328 | object_callbacks.h \ |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 329 | profiler_options.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 330 | quick/inline_method_analyser.h \ |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 331 | runtime.h \ |
| 332 | stack.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 333 | thread.h \ |
| 334 | thread_state.h \ |
| 335 | verifier/method_verifier.h |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 336 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 337 | LIBART_CFLAGS := -DBUILDING_LIBART=1 |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 338 | |
Christopher Ferris | fc35de0 | 2014-07-10 18:53:22 -0700 | [diff] [blame] | 339 | ifeq ($(MALLOC_IMPL),dlmalloc) |
Christopher Ferris | c4ddc04 | 2014-05-13 14:47:50 -0700 | [diff] [blame] | 340 | LIBART_CFLAGS += -DUSE_DLMALLOC |
Christopher Ferris | fc35de0 | 2014-07-10 18:53:22 -0700 | [diff] [blame] | 341 | else |
| 342 | LIBART_CFLAGS += -DUSE_JEMALLOC |
Christopher Ferris | c4ddc04 | 2014-05-13 14:47:50 -0700 | [diff] [blame] | 343 | endif |
| 344 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 345 | # Default dex2oat instruction set features. |
| 346 | LIBART_HOST_DEFAULT_INSTRUCTION_SET_FEATURES := default |
| 347 | LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := default |
| 348 | 2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := default |
| 349 | ifeq ($(DEX2OAT_TARGET_ARCH),arm) |
| 350 | ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a15 krait denver)) |
Andreas Gampe | 72a122c | 2014-11-13 19:10:33 -0800 | [diff] [blame] | 351 | LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := atomic_ldrd_strd,div |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 352 | else |
| 353 | ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a7)) |
| 354 | LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := div |
| 355 | endif |
| 356 | endif |
| 357 | endif |
| 358 | ifeq ($(2ND_DEX2OAT_TARGET_ARCH),arm) |
| 359 | ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a15 krait denver)) |
Andreas Gampe | 72a122c | 2014-11-13 19:10:33 -0800 | [diff] [blame] | 360 | 2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := atomic_ldrd_strd,div |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 361 | else |
| 362 | ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a7)) |
| 363 | 2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := div |
| 364 | endif |
| 365 | endif |
| 366 | endif |
| 367 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 368 | # $(1): target or host |
| 369 | # $(2): ndebug or debug |
| 370 | define build-libart |
| 371 | ifneq ($(1),target) |
| 372 | ifneq ($(1),host) |
| 373 | $$(error expected target or host for argument 1, received $(1)) |
| 374 | endif |
| 375 | endif |
| 376 | ifneq ($(2),ndebug) |
| 377 | ifneq ($(2),debug) |
| 378 | $$(error expected ndebug or debug for argument 2, received $(2)) |
| 379 | endif |
| 380 | endif |
| 381 | |
| 382 | art_target_or_host := $(1) |
| 383 | art_ndebug_or_debug := $(2) |
| 384 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 385 | include $$(CLEAR_VARS) |
Chih-Hung Hsieh | c959695 | 2014-10-16 12:14:02 -0700 | [diff] [blame] | 386 | # Clang assembler has problem with macros in asm_support_x86.S, http://b/17443165, |
| 387 | # on linux. Yet sdk on mac needs integrated assembler. |
| 388 | ifeq ($$(HOST_OS),darwin) |
| 389 | LOCAL_CLANG_ASFLAGS += -integrated-as |
| 390 | else |
| 391 | LOCAL_CLANG_ASFLAGS += -no-integrated-as |
| 392 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 393 | LOCAL_CPP_EXTENSION := $$(ART_CPP_EXTENSION) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 394 | ifeq ($$(art_ndebug_or_debug),ndebug) |
| 395 | LOCAL_MODULE := libart |
Dehao Chen | 6c36a8b | 2014-11-13 14:13:58 -0800 | [diff] [blame] | 396 | ifeq ($$(art_target_or_host),target) |
| 397 | LOCAL_FDO_SUPPORT := true |
| 398 | endif |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 399 | else # debug |
| 400 | LOCAL_MODULE := libartd |
| 401 | endif |
| 402 | |
| 403 | LOCAL_MODULE_TAGS := optional |
| 404 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 405 | |
| 406 | ifeq ($$(art_target_or_host),target) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 407 | LOCAL_SRC_FILES := $$(LIBART_TARGET_SRC_FILES) |
| 408 | $$(foreach arch,$$(ART_TARGET_SUPPORTED_ARCH), \ |
| 409 | $$(eval LOCAL_SRC_FILES_$$(arch) := $$$$(LIBART_TARGET_SRC_FILES_$$(arch)))) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 410 | else # host |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 411 | LOCAL_SRC_FILES := $$(LIBART_HOST_SRC_FILES) |
| 412 | LOCAL_SRC_FILES_32 := $$(LIBART_HOST_SRC_FILES_32) |
| 413 | LOCAL_SRC_FILES_64 := $$(LIBART_HOST_SRC_FILES_64) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 414 | LOCAL_IS_HOST_MODULE := true |
| 415 | endif |
| 416 | |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 417 | GENERATED_SRC_DIR := $$(call local-generated-sources-dir) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 418 | ENUM_OPERATOR_OUT_CC_FILES := $$(patsubst %.h,%_operator_out.cc,$$(LIBART_ENUM_OPERATOR_OUT_HEADER_FILES)) |
| 419 | ENUM_OPERATOR_OUT_GEN := $$(addprefix $$(GENERATED_SRC_DIR)/,$$(ENUM_OPERATOR_OUT_CC_FILES)) |
| 420 | |
| 421 | $$(ENUM_OPERATOR_OUT_GEN): art/tools/generate-operator-out.py |
| 422 | $$(ENUM_OPERATOR_OUT_GEN): PRIVATE_CUSTOM_TOOL = art/tools/generate-operator-out.py $(LOCAL_PATH) $$< > $$@ |
| 423 | $$(ENUM_OPERATOR_OUT_GEN): $$(GENERATED_SRC_DIR)/%_operator_out.cc : $(LOCAL_PATH)/%.h |
| 424 | $$(transform-generated-source) |
| 425 | |
| 426 | LOCAL_GENERATED_SOURCES += $$(ENUM_OPERATOR_OUT_GEN) |
| 427 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 428 | LOCAL_CFLAGS := $$(LIBART_CFLAGS) |
Dan Albert | 58bea4a | 2014-08-09 18:08:07 -0700 | [diff] [blame] | 429 | LOCAL_LDFLAGS := $$(LIBART_LDFLAGS) |
Ian Rogers | c5f1773 | 2014-06-05 20:48:42 -0700 | [diff] [blame] | 430 | ifeq ($$(art_target_or_host),target) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 431 | LOCAL_LDFLAGS += $$(LIBART_TARGET_LDFLAGS) |
Ian Rogers | c5f1773 | 2014-06-05 20:48:42 -0700 | [diff] [blame] | 432 | else |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 433 | LOCAL_LDFLAGS += $$(LIBART_HOST_LDFLAGS) |
Ian Rogers | c5f1773 | 2014-06-05 20:48:42 -0700 | [diff] [blame] | 434 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 435 | $$(foreach arch,$$(ART_TARGET_SUPPORTED_ARCH), \ |
| 436 | $$(eval LOCAL_LDFLAGS_$$(arch) := $$(LIBART_TARGET_LDFLAGS_$$(arch)))) |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 437 | |
Andreas Gampe | 5ca4eaa | 2014-05-29 02:09:33 -0700 | [diff] [blame] | 438 | # Clang usage |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 439 | ifeq ($$(art_target_or_host),target) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 440 | $$(eval $$(call set-target-local-clang-vars)) |
| 441 | $$(eval $$(call set-target-local-cflags-vars,$(2))) |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 442 | LOCAL_CFLAGS_$(DEX2OAT_TARGET_ARCH) += -DART_DEFAULT_INSTRUCTION_SET_FEATURES="$(LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES)" |
| 443 | LOCAL_CFLAGS_$(2ND_DEX2OAT_TARGET_ARCH) += -DART_DEFAULT_INSTRUCTION_SET_FEATURES="$(2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES)" |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 444 | else # host |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 445 | LOCAL_CLANG := $$(ART_HOST_CLANG) |
| 446 | LOCAL_LDLIBS := $$(ART_HOST_LDLIBS) |
| 447 | LOCAL_LDLIBS += -ldl -lpthread |
| 448 | ifeq ($$(HOST_OS),linux) |
| 449 | LOCAL_LDLIBS += -lrt |
| 450 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 451 | LOCAL_CFLAGS += $$(ART_HOST_CFLAGS) |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 452 | LOCAL_CFLAGS += -DART_DEFAULT_INSTRUCTION_SET_FEATURES="$(LIBART_HOST_DEFAULT_INSTRUCTION_SET_FEATURES)" |
| 453 | |
Andreas Gampe | 5ca4eaa | 2014-05-29 02:09:33 -0700 | [diff] [blame] | 454 | ifeq ($$(art_ndebug_or_debug),debug) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 455 | LOCAL_CFLAGS += $$(ART_HOST_DEBUG_CFLAGS) |
Andreas Gampe | 5ca4eaa | 2014-05-29 02:09:33 -0700 | [diff] [blame] | 456 | else |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 457 | LOCAL_CFLAGS += $$(ART_HOST_NON_DEBUG_CFLAGS) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 458 | endif |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 459 | LOCAL_MULTILIB := both |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 460 | endif |
Andreas Gampe | 5ca4eaa | 2014-05-29 02:09:33 -0700 | [diff] [blame] | 461 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 462 | LOCAL_C_INCLUDES += $$(ART_C_INCLUDES) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 463 | LOCAL_C_INCLUDES += art/cmdline |
Dave Allison | f4b80bc | 2014-05-14 15:41:25 -0700 | [diff] [blame] | 464 | LOCAL_C_INCLUDES += art/sigchainlib |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 465 | LOCAL_C_INCLUDES += art |
Dave Allison | f4b80bc | 2014-05-14 15:41:25 -0700 | [diff] [blame] | 466 | |
Ian Rogers | 872dd82 | 2014-10-30 11:19:14 -0700 | [diff] [blame] | 467 | LOCAL_SHARED_LIBRARIES := libnativehelper libnativebridge libsigchain |
Dan Albert | e73a064 | 2014-11-11 15:14:07 -0800 | [diff] [blame] | 468 | LOCAL_SHARED_LIBRARIES += libbacktrace |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 469 | ifeq ($$(art_target_or_host),target) |
Ian Rogers | 872dd82 | 2014-10-30 11:19:14 -0700 | [diff] [blame] | 470 | LOCAL_SHARED_LIBRARIES += libdl |
| 471 | # ZipArchive support, the order matters here to get all symbols. |
Narayan Kamath | 657318c | 2015-04-28 09:56:28 +0100 | [diff] [blame] | 472 | LOCAL_STATIC_LIBRARIES := libziparchive libz libbase |
Ian Rogers | 872dd82 | 2014-10-30 11:19:14 -0700 | [diff] [blame] | 473 | # For android::FileMap used by libziparchive. |
| 474 | LOCAL_SHARED_LIBRARIES += libutils |
| 475 | # For liblog, atrace, properties, ashmem, set_sched_policy and socket_peer_is_trusted. |
| 476 | LOCAL_SHARED_LIBRARIES += libcutils |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 477 | else # host |
Ian Rogers | 872dd82 | 2014-10-30 11:19:14 -0700 | [diff] [blame] | 478 | LOCAL_SHARED_LIBRARIES += libziparchive-host |
| 479 | # For ashmem_create_region. |
Brian Carlstrom | b4524fd | 2015-04-02 00:04:09 -0700 | [diff] [blame] | 480 | LOCAL_SHARED_LIBRARIES += libcutils |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 481 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 482 | LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_build.mk |
Ian Rogers | c7dd295 | 2014-10-21 23:31:19 -0700 | [diff] [blame] | 483 | LOCAL_ADDITIONAL_DEPENDENCIES += $$(LOCAL_PATH)/Android.mk |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 484 | |
| 485 | ifeq ($$(art_target_or_host),target) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 486 | LOCAL_MODULE_TARGET_ARCH := $$(ART_TARGET_SUPPORTED_ARCH) |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 487 | endif |
| 488 | |
Dan Albert | 31fb260 | 2014-09-30 22:10:10 -0700 | [diff] [blame] | 489 | LOCAL_NATIVE_COVERAGE := $(ART_COVERAGE) |
| 490 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 491 | ifeq ($$(art_target_or_host),target) |
Christopher Ferris | d59b7b1 | 2014-04-01 12:29:09 -0700 | [diff] [blame] | 492 | ifneq ($$(art_ndebug_or_debug),debug) |
| 493 | # Leave the symbols in the shared library so that stack unwinders can |
| 494 | # produce meaningful name resolution. |
| 495 | LOCAL_STRIP_MODULE := keep_symbols |
| 496 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 497 | include $$(BUILD_SHARED_LIBRARY) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 498 | else # host |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 499 | include $$(BUILD_HOST_SHARED_LIBRARY) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 500 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 501 | |
| 502 | # Clear locally defined variables. |
| 503 | GENERATED_SRC_DIR := |
| 504 | ENUM_OPERATOR_OUT_CC_FILES := |
| 505 | ENUM_OPERATOR_OUT_GEN := |
| 506 | art_target_or_host := |
| 507 | art_ndebug_or_debug := |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 508 | endef |
| 509 | |
Ian Rogers | 719d1a3 | 2014-03-06 12:13:39 -0800 | [diff] [blame] | 510 | # We always build dex2oat and dependencies, even if the host build is otherwise disabled, since |
| 511 | # they are used to cross compile for the target. |
Junmo Park | 76ab347 | 2014-08-11 21:28:16 +0900 | [diff] [blame] | 512 | ifeq ($(ART_BUILD_HOST_NDEBUG),true) |
Ian Rogers | c5f1773 | 2014-06-05 20:48:42 -0700 | [diff] [blame] | 513 | $(eval $(call build-libart,host,ndebug)) |
| 514 | endif |
Junmo Park | 76ab347 | 2014-08-11 21:28:16 +0900 | [diff] [blame] | 515 | ifeq ($(ART_BUILD_HOST_DEBUG),true) |
Ian Rogers | c5f1773 | 2014-06-05 20:48:42 -0700 | [diff] [blame] | 516 | $(eval $(call build-libart,host,debug)) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 517 | endif |
Ian Rogers | 719d1a3 | 2014-03-06 12:13:39 -0800 | [diff] [blame] | 518 | |
| 519 | ifeq ($(ART_BUILD_TARGET_NDEBUG),true) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 520 | # $(error $(call build-libart,target,ndebug)) |
Andreas Gampe | 5ca4eaa | 2014-05-29 02:09:33 -0700 | [diff] [blame] | 521 | $(eval $(call build-libart,target,ndebug)) |
Ian Rogers | 719d1a3 | 2014-03-06 12:13:39 -0800 | [diff] [blame] | 522 | endif |
| 523 | ifeq ($(ART_BUILD_TARGET_DEBUG),true) |
Andreas Gampe | 5ca4eaa | 2014-05-29 02:09:33 -0700 | [diff] [blame] | 524 | $(eval $(call build-libart,target,debug)) |
Ian Rogers | 719d1a3 | 2014-03-06 12:13:39 -0800 | [diff] [blame] | 525 | endif |
Dave Allison | f4b80bc | 2014-05-14 15:41:25 -0700 | [diff] [blame] | 526 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 527 | # Clear locally defined variables. |
| 528 | LOCAL_PATH := |
| 529 | LIBART_COMMON_SRC_FILES := |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 530 | LIBART_HOST_DEFAULT_INSTRUCTION_SET_FEATURES := |
| 531 | LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := |
| 532 | 2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 533 | LIBART_TARGET_LDFLAGS := |
| 534 | LIBART_HOST_LDFLAGS := |
| 535 | LIBART_TARGET_SRC_FILES := |
| 536 | LIBART_TARGET_SRC_FILES_arm := |
| 537 | LIBART_TARGET_SRC_FILES_arm64 := |
| 538 | LIBART_TARGET_SRC_FILES_x86 := |
| 539 | LIBART_TARGET_SRC_FILES_x86_64 := |
| 540 | LIBART_TARGET_SRC_FILES_mips := |
Andreas Gampe | 1a5c406 | 2015-01-15 12:10:47 -0800 | [diff] [blame] | 541 | LIBART_TARGET_SRC_FILES_mips64 := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 542 | LIBART_HOST_SRC_FILES := |
| 543 | LIBART_HOST_SRC_FILES_32 := |
| 544 | LIBART_HOST_SRC_FILES_64 := |
| 545 | LIBART_ENUM_OPERATOR_OUT_HEADER_FILES := |
| 546 | LIBART_CFLAGS := |
Elliott Hughes | 7ac7e32 | 2014-06-27 17:20:59 -0700 | [diff] [blame] | 547 | build-libart := |