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