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