Android.mk revision aa5168291c46f9b418d989bccf2d8e09338a83e6
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 object_lock.cc \ 158 offsets.cc \ 159 os_linux.cc \ 160 parsed_options.cc \ 161 primitive.cc \ 162 quick_exception_handler.cc \ 163 quick/inline_method_analyser.cc \ 164 reference_table.cc \ 165 reflection.cc \ 166 runtime.cc \ 167 runtime_options.cc \ 168 signal_catcher.cc \ 169 stack.cc \ 170 stack_map.cc \ 171 thread.cc \ 172 thread_list.cc \ 173 thread_pool.cc \ 174 trace.cc \ 175 transaction.cc \ 176 profiler.cc \ 177 fault_handler.cc \ 178 utf.cc \ 179 utils.cc \ 180 verifier/dex_gc_map.cc \ 181 verifier/instruction_flags.cc \ 182 verifier/method_verifier.cc \ 183 verifier/reg_type.cc \ 184 verifier/reg_type_cache.cc \ 185 verifier/register_line.cc \ 186 well_known_classes.cc \ 187 zip_archive.cc 188 189LIBART_COMMON_SRC_FILES += \ 190 arch/context.cc \ 191 arch/instruction_set.cc \ 192 arch/instruction_set_features.cc \ 193 arch/memcmp16.cc \ 194 arch/arm/instruction_set_features_arm.cc \ 195 arch/arm/registers_arm.cc \ 196 arch/arm64/instruction_set_features_arm64.cc \ 197 arch/arm64/registers_arm64.cc \ 198 arch/mips/instruction_set_features_mips.cc \ 199 arch/mips/registers_mips.cc \ 200 arch/mips64/instruction_set_features_mips64.cc \ 201 arch/mips64/registers_mips64.cc \ 202 arch/x86/instruction_set_features_x86.cc \ 203 arch/x86/registers_x86.cc \ 204 arch/x86_64/registers_x86_64.cc \ 205 entrypoints/entrypoint_utils.cc \ 206 entrypoints/interpreter/interpreter_entrypoints.cc \ 207 entrypoints/jni/jni_entrypoints.cc \ 208 entrypoints/math_entrypoints.cc \ 209 entrypoints/quick/quick_alloc_entrypoints.cc \ 210 entrypoints/quick/quick_cast_entrypoints.cc \ 211 entrypoints/quick/quick_deoptimization_entrypoints.cc \ 212 entrypoints/quick/quick_dexcache_entrypoints.cc \ 213 entrypoints/quick/quick_field_entrypoints.cc \ 214 entrypoints/quick/quick_fillarray_entrypoints.cc \ 215 entrypoints/quick/quick_instrumentation_entrypoints.cc \ 216 entrypoints/quick/quick_jni_entrypoints.cc \ 217 entrypoints/quick/quick_lock_entrypoints.cc \ 218 entrypoints/quick/quick_math_entrypoints.cc \ 219 entrypoints/quick/quick_thread_entrypoints.cc \ 220 entrypoints/quick/quick_throw_entrypoints.cc \ 221 entrypoints/quick/quick_trampoline_entrypoints.cc 222 223LIBART_TARGET_LDFLAGS := 224LIBART_HOST_LDFLAGS := 225 226LIBART_TARGET_SRC_FILES := \ 227 $(LIBART_COMMON_SRC_FILES) \ 228 jdwp/jdwp_adb.cc \ 229 monitor_android.cc \ 230 runtime_android.cc \ 231 thread_android.cc 232 233LIBART_TARGET_SRC_FILES_arm := \ 234 arch/arm/context_arm.cc.arm \ 235 arch/arm/entrypoints_init_arm.cc \ 236 arch/arm/instruction_set_features_assembly_tests.S \ 237 arch/arm/jni_entrypoints_arm.S \ 238 arch/arm/memcmp16_arm.S \ 239 arch/arm/quick_entrypoints_arm.S \ 240 arch/arm/quick_entrypoints_cc_arm.cc \ 241 arch/arm/thread_arm.cc \ 242 arch/arm/fault_handler_arm.cc 243 244LIBART_TARGET_SRC_FILES_arm64 := \ 245 arch/arm64/context_arm64.cc \ 246 arch/arm64/entrypoints_init_arm64.cc \ 247 arch/arm64/jni_entrypoints_arm64.S \ 248 arch/arm64/memcmp16_arm64.S \ 249 arch/arm64/quick_entrypoints_arm64.S \ 250 arch/arm64/thread_arm64.cc \ 251 monitor_pool.cc \ 252 arch/arm64/fault_handler_arm64.cc 253 254LIBART_SRC_FILES_x86 := \ 255 arch/x86/context_x86.cc \ 256 arch/x86/entrypoints_init_x86.cc \ 257 arch/x86/jni_entrypoints_x86.S \ 258 arch/x86/memcmp16_x86.S \ 259 arch/x86/quick_entrypoints_x86.S \ 260 arch/x86/thread_x86.cc \ 261 arch/x86/fault_handler_x86.cc 262 263LIBART_TARGET_SRC_FILES_x86 := \ 264 $(LIBART_SRC_FILES_x86) 265 266# Note that the fault_handler_x86.cc is not a mistake. This file is 267# shared between the x86 and x86_64 architectures. 268LIBART_SRC_FILES_x86_64 := \ 269 arch/x86_64/context_x86_64.cc \ 270 arch/x86_64/entrypoints_init_x86_64.cc \ 271 arch/x86_64/jni_entrypoints_x86_64.S \ 272 arch/x86_64/memcmp16_x86_64.S \ 273 arch/x86_64/quick_entrypoints_x86_64.S \ 274 arch/x86_64/thread_x86_64.cc \ 275 monitor_pool.cc \ 276 arch/x86/fault_handler_x86.cc 277 278LIBART_TARGET_SRC_FILES_x86_64 := \ 279 $(LIBART_SRC_FILES_x86_64) \ 280 281LIBART_TARGET_SRC_FILES_mips := \ 282 arch/mips/context_mips.cc \ 283 arch/mips/entrypoints_init_mips.cc \ 284 arch/mips/jni_entrypoints_mips.S \ 285 arch/mips/memcmp16_mips.S \ 286 arch/mips/quick_entrypoints_mips.S \ 287 arch/mips/thread_mips.cc \ 288 arch/mips/fault_handler_mips.cc 289 290LIBART_TARGET_SRC_FILES_mips64 := \ 291 arch/mips64/context_mips64.cc \ 292 arch/mips64/entrypoints_init_mips64.cc \ 293 arch/mips64/jni_entrypoints_mips64.S \ 294 arch/mips64/memcmp16_mips64.S \ 295 arch/mips64/quick_entrypoints_mips64.S \ 296 arch/mips64/thread_mips64.cc \ 297 monitor_pool.cc \ 298 arch/mips64/fault_handler_mips64.cc 299 300LIBART_HOST_SRC_FILES := \ 301 $(LIBART_COMMON_SRC_FILES) \ 302 monitor_linux.cc \ 303 runtime_linux.cc \ 304 thread_linux.cc 305 306LIBART_HOST_SRC_FILES_32 := \ 307 $(LIBART_SRC_FILES_x86) 308 309LIBART_HOST_SRC_FILES_64 := \ 310 $(LIBART_SRC_FILES_x86_64) 311 312LIBART_ENUM_OPERATOR_OUT_HEADER_FILES := \ 313 arch/instruction_set.h \ 314 base/allocator.h \ 315 base/mutex.h \ 316 debugger.h \ 317 base/unix_file/fd_file.h \ 318 dex_file.h \ 319 dex_instruction.h \ 320 dex_instruction_utils.h \ 321 gc_root.h \ 322 gc/allocator_type.h \ 323 gc/allocator/rosalloc.h \ 324 gc/collector_type.h \ 325 gc/collector/gc_type.h \ 326 gc/heap.h \ 327 gc/space/region_space.h \ 328 gc/space/space.h \ 329 gc/weak_root_state.h \ 330 image.h \ 331 instrumentation.h \ 332 indirect_reference_table.h \ 333 invoke_type.h \ 334 jdwp/jdwp.h \ 335 jdwp/jdwp_constants.h \ 336 lock_word.h \ 337 mirror/class.h \ 338 oat.h \ 339 object_callbacks.h \ 340 profiler_options.h \ 341 quick/inline_method_analyser.h \ 342 runtime.h \ 343 stack.h \ 344 thread.h \ 345 thread_state.h \ 346 verifier/method_verifier.h 347 348LIBART_CFLAGS := -DBUILDING_LIBART=1 349 350LIBART_TARGET_CFLAGS := 351LIBART_HOST_CFLAGS := 352 353ifeq ($(MALLOC_IMPL),dlmalloc) 354 LIBART_TARGET_CFLAGS += -DUSE_DLMALLOC 355else 356 LIBART_TARGET_CFLAGS += -DUSE_JEMALLOC 357endif 358 359# Default dex2oat instruction set features. 360LIBART_HOST_DEFAULT_INSTRUCTION_SET_FEATURES := default 361LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := default 3622ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := default 363ifeq ($(DEX2OAT_TARGET_ARCH),arm) 364 ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a15 krait denver)) 365 LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := atomic_ldrd_strd,div 366 else 367 ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a7)) 368 LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := div 369 endif 370 endif 371endif 372ifeq ($(2ND_DEX2OAT_TARGET_ARCH),arm) 373 ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a15 krait denver)) 374 2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := atomic_ldrd_strd,div 375 else 376 ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a7)) 377 2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := div 378 endif 379 endif 380endif 381 382# $(1): target or host 383# $(2): ndebug or debug 384# $(3): static or shared (empty means shared, applies only for host) 385define build-libart 386 ifneq ($(1),target) 387 ifneq ($(1),host) 388 $$(error expected target or host for argument 1, received $(1)) 389 endif 390 endif 391 ifneq ($(2),ndebug) 392 ifneq ($(2),debug) 393 $$(error expected ndebug or debug for argument 2, received $(2)) 394 endif 395 endif 396 397 art_target_or_host := $(1) 398 art_ndebug_or_debug := $(2) 399 art_static_or_shared := $(3) 400 401 include $$(CLEAR_VARS) 402 LOCAL_CPP_EXTENSION := $$(ART_CPP_EXTENSION) 403 ifeq ($$(art_ndebug_or_debug),ndebug) 404 LOCAL_MODULE := libart 405 ifeq ($$(art_target_or_host),target) 406 LOCAL_FDO_SUPPORT := true 407 endif 408 else # debug 409 LOCAL_MODULE := libartd 410 endif 411 412 LOCAL_MODULE_TAGS := optional 413 414 ifeq ($$(art_static_or_shared),static) 415 LOCAL_MODULE_CLASS := STATIC_LIBRARIES 416 else 417 LOCAL_MODULE_CLASS := SHARED_LIBRARIES 418 endif 419 420 ifeq ($$(art_target_or_host),target) 421 LOCAL_SRC_FILES := $$(LIBART_TARGET_SRC_FILES) 422 $$(foreach arch,$$(ART_TARGET_SUPPORTED_ARCH), \ 423 $$(eval LOCAL_SRC_FILES_$$(arch) := $$$$(LIBART_TARGET_SRC_FILES_$$(arch)))) 424 else # host 425 LOCAL_SRC_FILES := $$(LIBART_HOST_SRC_FILES) 426 LOCAL_SRC_FILES_32 := $$(LIBART_HOST_SRC_FILES_32) 427 LOCAL_SRC_FILES_64 := $$(LIBART_HOST_SRC_FILES_64) 428 LOCAL_IS_HOST_MODULE := true 429 endif 430 431 GENERATED_SRC_DIR := $$(call local-generated-sources-dir) 432 ENUM_OPERATOR_OUT_CC_FILES := $$(patsubst %.h,%_operator_out.cc,$$(LIBART_ENUM_OPERATOR_OUT_HEADER_FILES)) 433 ENUM_OPERATOR_OUT_GEN := $$(addprefix $$(GENERATED_SRC_DIR)/,$$(ENUM_OPERATOR_OUT_CC_FILES)) 434 435$$(ENUM_OPERATOR_OUT_GEN): art/tools/generate-operator-out.py 436$$(ENUM_OPERATOR_OUT_GEN): PRIVATE_CUSTOM_TOOL = art/tools/generate-operator-out.py $(LOCAL_PATH) $$< > $$@ 437$$(ENUM_OPERATOR_OUT_GEN): $$(GENERATED_SRC_DIR)/%_operator_out.cc : $(LOCAL_PATH)/%.h 438 $$(transform-generated-source) 439 440 LOCAL_GENERATED_SOURCES += $$(ENUM_OPERATOR_OUT_GEN) 441 442 LOCAL_CFLAGS := $$(LIBART_CFLAGS) 443 LOCAL_LDFLAGS := $$(LIBART_LDFLAGS) 444 ifeq ($$(art_target_or_host),target) 445 LOCAL_CFLAGS += $$(LIBART_TARGET_CFLAGS) 446 LOCAL_LDFLAGS += $$(LIBART_TARGET_LDFLAGS) 447 else #host 448 LOCAL_CFLAGS += $$(LIBART_HOST_CFLAGS) 449 LOCAL_LDFLAGS += $$(LIBART_HOST_LDFLAGS) 450 ifeq ($$(art_static_or_shared),static) 451 LOCAL_LDFLAGS += -static 452 endif 453 endif 454 $$(foreach arch,$$(ART_TARGET_SUPPORTED_ARCH), \ 455 $$(eval LOCAL_LDFLAGS_$$(arch) := $$(LIBART_TARGET_LDFLAGS_$$(arch)))) 456 457 # Clang usage 458 ifeq ($$(art_target_or_host),target) 459 $$(eval $$(call set-target-local-clang-vars)) 460 $$(eval $$(call set-target-local-cflags-vars,$(2))) 461 LOCAL_CFLAGS_$(DEX2OAT_TARGET_ARCH) += -DART_DEFAULT_INSTRUCTION_SET_FEATURES="$(LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES)" 462 LOCAL_CFLAGS_$(2ND_DEX2OAT_TARGET_ARCH) += -DART_DEFAULT_INSTRUCTION_SET_FEATURES="$(2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES)" 463 else # host 464 LOCAL_CLANG := $$(ART_HOST_CLANG) 465 LOCAL_LDLIBS := $$(ART_HOST_LDLIBS) 466 LOCAL_LDLIBS += -ldl -lpthread 467 ifeq ($$(HOST_OS),linux) 468 LOCAL_LDLIBS += -lrt 469 endif 470 LOCAL_CFLAGS += $$(ART_HOST_CFLAGS) 471 LOCAL_CFLAGS += -DART_DEFAULT_INSTRUCTION_SET_FEATURES="$(LIBART_HOST_DEFAULT_INSTRUCTION_SET_FEATURES)" 472 LOCAL_ASFLAGS += $$(ART_HOST_ASFLAGS) 473 474 ifeq ($$(art_ndebug_or_debug),debug) 475 LOCAL_CFLAGS += $$(ART_HOST_DEBUG_CFLAGS) 476 else 477 LOCAL_CFLAGS += $$(ART_HOST_NON_DEBUG_CFLAGS) 478 endif 479 LOCAL_MULTILIB := both 480 endif 481 482 LOCAL_C_INCLUDES += $$(ART_C_INCLUDES) 483 LOCAL_C_INCLUDES += art/cmdline 484 LOCAL_C_INCLUDES += art/sigchainlib 485 LOCAL_C_INCLUDES += art 486 487 ifeq ($$(art_static_or_shared),static) 488 LOCAL_STATIC_LIBRARIES := libnativehelper libnativebridge libsigchain_dummy libbacktrace 489 else 490 LOCAL_SHARED_LIBRARIES := libnativehelper libnativebridge libsigchain libbacktrace 491 endif 492 493 ifeq ($$(art_target_or_host),target) 494 LOCAL_SHARED_LIBRARIES += libdl 495 # ZipArchive support, the order matters here to get all symbols. 496 LOCAL_STATIC_LIBRARIES := libziparchive libz libbase 497 # For android::FileMap used by libziparchive. 498 LOCAL_SHARED_LIBRARIES += libutils 499 # For liblog, atrace, properties, ashmem, set_sched_policy and socket_peer_is_trusted. 500 LOCAL_SHARED_LIBRARIES += libcutils 501 else # host 502 ifeq ($$(art_static_or_shared),static) 503 LOCAL_STATIC_LIBRARIES += libziparchive-host libz 504 # For ashmem_create_region. 505 LOCAL_STATIC_LIBRARIES += libcutils 506 else 507 LOCAL_SHARED_LIBRARIES += libziparchive-host libz-host 508 # For ashmem_create_region. 509 LOCAL_SHARED_LIBRARIES += libcutils 510 endif 511 endif 512 LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_build.mk 513 LOCAL_ADDITIONAL_DEPENDENCIES += $$(LOCAL_PATH)/Android.mk 514 515 ifeq ($$(art_target_or_host),target) 516 LOCAL_MODULE_TARGET_ARCH := $$(ART_TARGET_SUPPORTED_ARCH) 517 endif 518 519 LOCAL_NATIVE_COVERAGE := $(ART_COVERAGE) 520 521 ifeq ($$(art_target_or_host),target) 522 ifneq ($$(art_ndebug_or_debug),debug) 523 # Leave the symbols in the shared library so that stack unwinders can 524 # produce meaningful name resolution. 525 LOCAL_STRIP_MODULE := keep_symbols 526 endif 527 include $$(BUILD_SHARED_LIBRARY) 528 else # host 529 ifeq ($$(art_static_or_shared),static) 530 include $$(BUILD_HOST_STATIC_LIBRARY) 531 else 532 include $$(BUILD_HOST_SHARED_LIBRARY) 533 endif 534 endif 535 536 # Clear locally defined variables. 537 GENERATED_SRC_DIR := 538 ENUM_OPERATOR_OUT_CC_FILES := 539 ENUM_OPERATOR_OUT_GEN := 540 art_target_or_host := 541 art_ndebug_or_debug := 542 art_static_or_shared := 543endef 544 545# We always build dex2oat and dependencies, even if the host build is otherwise disabled, since 546# they are used to cross compile for the target. 547ifeq ($(ART_BUILD_HOST_NDEBUG),true) 548 $(eval $(call build-libart,host,ndebug)) 549 ifeq ($(ART_BUILD_HOST_STATIC),true) 550 $(eval $(call build-libart,host,ndebug,static)) 551 endif 552endif 553ifeq ($(ART_BUILD_HOST_DEBUG),true) 554 $(eval $(call build-libart,host,debug)) 555 ifeq ($(ART_BUILD_HOST_STATIC),true) 556 $(eval $(call build-libart,host,debug,static)) 557 endif 558endif 559 560ifeq ($(ART_BUILD_TARGET_NDEBUG),true) 561# $(error $(call build-libart,target,ndebug)) 562 $(eval $(call build-libart,target,ndebug)) 563endif 564ifeq ($(ART_BUILD_TARGET_DEBUG),true) 565 $(eval $(call build-libart,target,debug)) 566endif 567 568# Clear locally defined variables. 569LOCAL_PATH := 570LIBART_COMMON_SRC_FILES := 571LIBART_HOST_DEFAULT_INSTRUCTION_SET_FEATURES := 572LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := 5732ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := 574LIBART_TARGET_LDFLAGS := 575LIBART_HOST_LDFLAGS := 576LIBART_TARGET_SRC_FILES := 577LIBART_TARGET_SRC_FILES_arm := 578LIBART_TARGET_SRC_FILES_arm64 := 579LIBART_TARGET_SRC_FILES_x86 := 580LIBART_TARGET_SRC_FILES_x86_64 := 581LIBART_TARGET_SRC_FILES_mips := 582LIBART_TARGET_SRC_FILES_mips64 := 583LIBART_HOST_SRC_FILES := 584LIBART_HOST_SRC_FILES_32 := 585LIBART_HOST_SRC_FILES_64 := 586LIBART_ENUM_OPERATOR_OUT_HEADER_FILES := 587LIBART_CFLAGS := 588LIBART_TARGET_CFLAGS := 589LIBART_HOST_CFLAGS := 590build-libart := 591