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