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