#
# Common definitions for host or target builds of libdvm.
#
-# If you enable or disable optional features here,
-# rebuild the VM with "make clean-libdvm && make -j4 libdvm".
+# If you enable or disable optional features here, make sure you do
+# a "clean" build -- not everything depends on Dalvik.h. (See Android.mk
+# for the exact command.)
#
#
LOCAL_CFLAGS += -fstrict-aliasing -Wstrict-aliasing=2 -fno-align-jumps
#LOCAL_CFLAGS += -DUSE_INDIRECT_REF
+LOCAL_CFLAGS += -include "dalvikdefines.h"
#
# Optional features. These may impact the size or performance of the VM.
# - GDB helpers enabled
# - LOGV
# - assert()
+ # - full ELF symbols
#
LOCAL_CFLAGS += -DWITH_INSTR_CHECKS
LOCAL_CFLAGS += -DWITH_EXTRA_OBJECT_VALIDATION
# - all development features disabled
# - compiler optimizations enabled (redundant for "release" builds)
# - (debugging and profiling still enabled)
+ # - minimize ELF symbols to reduce code size by 10%
#
#LOCAL_CFLAGS += -DNDEBUG -DLOG_NDEBUG=1
# "-O2" is redundant for device (release) but useful for sim (debug)
LOCAL_CFLAGS += -DDVM_SHOW_EXCEPTION=1
# if you want to try with assertions on the device, add:
#LOCAL_CFLAGS += -UNDEBUG -DDEBUG=1 -DLOG_NDEBUG=1 -DWITH_DALVIK_ASSERT
+ # use GCC Visibility to reduce the footprint of runtime library
+ LOCAL_CFLAGS += -fvisibility=hidden
endif # !dvm_make_debug_vm
# bug hunting: checksum and verify interpreted stack when making JNI calls
SignalCatcher.c \
StdioConverter.c \
Sync.c \
+ TestCompability.c \
Thread.c \
UtfString.c \
alloc/clz.c.arm \
test/TestHash.c \
test/TestIndirectRefTable.c
-ifeq ($(WITH_JIT_TUNING),true)
- LOCAL_CFLAGS += -DWITH_JIT_TUNING
- # NOTE: Turn on assertion for JIT for now
- LOCAL_CFLAGS += -UNDEBUG -DDEBUG=1 -DLOG_NDEBUG=1 -DWITH_DALVIK_ASSERT
-endif
+WITH_JIT := $(strip $(WITH_JIT))
ifeq ($(WITH_JIT),true)
LOCAL_CFLAGS += -DWITH_JIT
compiler/Frontend.c \
compiler/Utility.c \
compiler/IntermediateRep.c \
+ compiler/Dataflow.c \
+ compiler/Loop.c \
+ compiler/Ralloc.c \
interp/Jit.c
endif
ifeq ($(WITH_JIT),true)
LOCAL_SRC_FILES += \
- compiler/codegen/arm/Codegen-$(dvm_arch_variant).c \
+ compiler/codegen/arm/RallocUtil.c \
+ compiler/codegen/arm/$(dvm_arch_variant)/Codegen.c \
+ compiler/codegen/arm/$(dvm_arch_variant)/CallingConvention.S \
compiler/codegen/arm/Assemble.c \
compiler/codegen/arm/ArchUtility.c \
compiler/codegen/arm/LocalOptimizations.c \
ifeq ($(dvm_arch),x86)
ifeq ($(dvm_os),linux)
-
-# TODO: Remove this once build core defines a default arch variant for x86
- ifneq ($(dvm_arch_variant),x86-atom)
- dvm_arch_variant := x86
- endif
MTERP_ARCH_KNOWN := true
LOCAL_SRC_FILES += \
arch/$(dvm_arch_variant)/Call386ABI.S \
ifeq ($(MTERP_ARCH_KNOWN),false)
# unknown architecture, try to use FFI
LOCAL_C_INCLUDES += external/libffi/$(dvm_os)-$(dvm_arch)
- LOCAL_SHARED_LIBRARIES += libffi
+
+ ifeq ($(dvm_os)-$(dvm_arch),darwin-x86)
+ # OSX includes libffi, so just make the linker aware of it directly.
+ LOCAL_LDLIBS += -lffi
+ else
+ LOCAL_SHARED_LIBRARIES += libffi
+ endif
LOCAL_SRC_FILES += \
arch/generic/Call.c \
-DdvmAsmSisterStart=0 -DdvmAsmSisterEnd=0 -DDVM_NO_ASM_INTERP=1
endif
-LOCAL_SHARED_LIBRARIES += \
- libnativehelper \
- libz
-
-LOCAL_STATIC_LIBRARIES += \
- libdex
+ifeq ($(TEST_VM_IN_ECLAIR),true)
+ LOCAL_CFLAGS += -DTEST_VM_IN_ECLAIR
+endif