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