Another couple of tweaks in my attempt to make a sane host build.
Change-Id: I49938c6aa933cca19874432b127ad9b1b49e3e79
diff --git a/vm/Android.mk b/vm/Android.mk
index 6e71655..353c1df 100644
--- a/vm/Android.mk
+++ b/vm/Android.mk
@@ -40,10 +40,14 @@
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 @@
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.
diff --git a/vm/Dvm.mk b/vm/Dvm.mk
index 5aea242..9422bb6 100644
--- a/vm/Dvm.mk
+++ b/vm/Dvm.mk
@@ -343,6 +343,3 @@
LOCAL_SHARED_LIBRARIES += \
libnativehelper \
libz
-
-LOCAL_STATIC_LIBRARIES += \
- libdex