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