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