OSDN Git Service

Merge "Do not merge: fix dns prefetch, multiply range" into gingerbread
[android-x86/external-webkit.git] / Android.mk
index 04483e3..21f6cf4 100644 (file)
@@ -34,19 +34,32 @@ LOCAL_PATH := $(call my-dir)
 #    can be set to true, so that two builds can be different but without
 #    specifying which JS engine to use.
 
-# To control if JSC JIT is used, please set ENABLE_ANDROID_JSC_JIT environment
+# To enable JIT in Android's JSC, please set ENABLE_JSC_JIT environment
 # variable to true.
 
 # Read JS_ENGINE environment variable
 JAVASCRIPT_ENGINE = $(JS_ENGINE)
 
+# The default / alternative engine depends on the device class.
+# On devices with a lot of memory (e.g. Passion/Sholes), the
+# default is V8. On everything else, the only choice is JSC.
+# TODO: use ARCH_ARM_HAVE_ARMV7 once that variable is added to
+# the build system.
+ifeq ($(ARCH_ARM_HAVE_VFP),true)
+    DEFAULT_ENGINE = v8
+    ALT_ENGINE = jsc
+else
+    DEFAULT_ENGINE = jsc
+    ALT_ENGINE = jsc
+endif
+
 ifneq ($(JAVASCRIPT_ENGINE),jsc)
   ifneq ($(JAVASCRIPT_ENGINE),v8)
     # No JS engine is specified, pickup the one we want as default.
     ifeq ($(USE_ALT_JS_ENGINE),true)
-      JAVASCRIPT_ENGINE = v8
+      JAVASCRIPT_ENGINE = $(ALT_ENGINE)
     else
-      JAVASCRIPT_ENGINE = jsc
+      JAVASCRIPT_ENGINE = $(DEFAULT_ENGINE)
     endif
   endif
 endif
@@ -210,10 +223,10 @@ LOCAL_CFLAGS += -fno-strict-aliasing
 LOCAL_CFLAGS += -include "WebCorePrefix.h"
 LOCAL_CFLAGS += -fvisibility=hidden
 
-# Enable JSC JIT if JSC is used and ENABLE_ANDROID_JSC_JIT environment
+# Enable JSC JIT if JSC is used and ENABLE_JSC_JIT environment
 # variable is set to true
 ifeq ($(JAVASCRIPT_ENGINE),jsc)
-ifeq ($(ENABLE_ANDROID_JSC_JIT),true)
+ifeq ($(ENABLE_JSC_JIT),true)
 LOCAL_CFLAGS += -DENABLE_ANDROID_JSC_JIT=1
 endif
 endif
@@ -224,10 +237,20 @@ LOCAL_CFLAGS += -Darm
 LOCAL_CFLAGS += -Wno-psabi
 endif
 
+# need a flag to tell the C side when we're on devices with large memory
+# budgets (i.e. larger than the low-end devices that initially shipped)
+ifeq ($(ARCH_ARM_HAVE_VFP),true)
+LOCAL_CFLAGS += -DANDROID_LARGE_MEMORY_DEVICE
+endif
+
 ifeq ($(ENABLE_SVG),true)
 LOCAL_CFLAGS += -DENABLE_SVG=1
 endif
 
+ifeq ($(ENABLE_WTF_USE_ACCELERATED_COMPOSITING),false)
+LOCAL_CFLAGS += -DWTF_USE_ACCELERATED_COMPOSITING=0
+endif
+
 ifeq ($(ENABLE_WTF_USE_ACCELERATED_COMPOSITING),true)
 LOCAL_CFLAGS += -DWTF_USE_ACCELERATED_COMPOSITING=1
 endif
@@ -255,7 +278,6 @@ LOCAL_SHARED_LIBRARIES := \
        libui \
        libcutils \
        libicuuc \
-       libicudata \
        libicui18n \
        libmedia \
        libsurfaceflinger_client