OSDN Git Service

Another couple of tweaks in my attempt to make a sane host build.
authorDan Bornstein <danfuzz@android.com>
Fri, 16 Oct 2009 17:51:23 +0000 (10:51 -0700)
committerDan Bornstein <danfuzz@android.com>
Tue, 20 Oct 2009 17:50:09 +0000 (10:50 -0700)
Change-Id: I49938c6aa933cca19874432b127ad9b1b49e3e79

vm/Android.mk
vm/Dvm.mk

index 6e71655..353c1df 100644 (file)
@@ -40,10 +40,14 @@ dvm_simulator := $(TARGET_SIMULATOR)
 
 include $(LOCAL_PATH)/Dvm.mk
 
-# liblog and libcutils are shared for target.
+# liblog and libcutils are shared in this case.
 LOCAL_SHARED_LIBRARIES += \
        liblog libcutils
 
+# libdex is static in this case. (That is, on device, we only include
+# whatever we specifically need from it directly in libdvm.)
+LOCAL_STATIC_LIBRARIES += libdex
+
 LOCAL_MODULE := libdvm
 
 include $(BUILD_SHARED_LIBRARY)
@@ -65,9 +69,14 @@ ifeq ($(WITH_HOST_DALVIK),true)
 
     include $(LOCAL_PATH)/Dvm.mk
 
-    # liblog and libcutils are static for host.
-    LOCAL_STATIC_LIBRARIES += \
-        liblog libcutils
+    # And we need to include all of liblog, libcutils, and libdex:
+    # The result itself is a static library, and LOCAL_STATIC_LIBRARIES
+    # doesn't actually cause any code from the specified libraries to
+    # be included. No I'm not entirely sure what LOCAL_STATIC_LIBRARIES
+    # is even supposed to mean in this context, but it is in fact
+    # meaningfully used in other parts of the build.
+    LOCAL_WHOLE_STATIC_LIBRARIES += \
+       libdex liblog libcutils
 
     # libffi is called libffi-host on the host and should be staticly
     # linked. Similarly libnativehelper.
index 5aea242..9422bb6 100644 (file)
--- a/vm/Dvm.mk
+++ b/vm/Dvm.mk
@@ -343,6 +343,3 @@ endif
 LOCAL_SHARED_LIBRARIES += \
        libnativehelper \
        libz
-
-LOCAL_STATIC_LIBRARIES += \
-       libdex