#
# 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 \
ifeq ($(WITH_JIT),true)
LOCAL_CFLAGS += -DWITH_JIT
- # Enable assert and JIT_TUNING for now
- LOCAL_CFLAGS += -UNDEBUG -DDEBUG=1 -DLOG_NDEBUG=1 -DWITH_DALVIK_ASSERT
- WITH_JIT_TUNING := true
LOCAL_SRC_FILES += \
../dexdump/OpCodeNames.c \
compiler/Compiler.c \
interp/Jit.c
endif
-ifeq ($(strip $(WITH_JIT_TUNING)),true)
- LOCAL_CFLAGS += -DWITH_JIT_TUNING
-endif
-
-# Enable JIT self verification tool. Runs compiled traces natively, then replays
-# them with the interpreter, and ensures memory and register state are the same.
-ifeq ($(WITH_SELF_VERIFICATION),true)
- LOCAL_CFLAGS += -DWITH_SELF_VERIFICATION
-endif
-
WITH_HPROF := $(strip $(WITH_HPROF))
ifeq ($(WITH_HPROF),)
WITH_HPROF := true
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_os),linux)
MTERP_ARCH_KNOWN := true
LOCAL_SRC_FILES += \
- arch/x86/Call386ABI.S \
- arch/x86/Hints386ABI.c \
- mterp/out/InterpC-x86.c \
- mterp/out/InterpAsm-x86.S
+ arch/$(dvm_arch_variant)/Call386ABI.S \
+ arch/$(dvm_arch_variant)/Hints386ABI.c \
+ mterp/out/InterpC-$(dvm_arch_variant).c \
+ mterp/out/InterpAsm-$(dvm_arch_variant).S
endif
endif
LOCAL_CFLAGS += -DdvmAsmInstructionStart=0 -DdvmAsmInstructionEnd=0 \
-DdvmAsmSisterStart=0 -DdvmAsmSisterEnd=0 -DDVM_NO_ASM_INTERP=1
endif
+
+ifeq ($(TEST_VM_IN_ECLAIR),true)
+ LOCAL_CFLAGS += -DTEST_VM_IN_ECLAIR
+endif