OSDN Git Service

Revert "Add liblog"
authorYing Wang <wangying@google.com>
Wed, 10 Apr 2013 05:32:21 +0000 (05:32 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Wed, 10 Apr 2013 05:32:21 +0000 (05:32 +0000)
This reverts commit 8722580d90840352883a84d1ca882e50220f3959

Change-Id: Iafdbb7f540a53ddc9dc2e21c0afddb62c44c4af8

core/binary.mk
tools/zipalign/Android.mk

index d70edbb..dd68fee 100644 (file)
@@ -66,6 +66,32 @@ else
   endif
 endif
 
+# Logging used to be part of libcutils (target) and libutils (sim);
+# hack modules that use those other libs to also include liblog.
+# All of this complexity is to make sure that liblog only appears
+# once, and appears just before libcutils or libutils on the link
+# line.
+# TODO: remove this hack and change all modules to use liblog
+# when necessary.
+define insert-liblog
+  $(if $(filter liblog,$(1)),$(1), \
+    $(if $(filter libcutils,$(1)), \
+      $(patsubst libcutils,liblog libcutils,$(1)) \
+     , \
+      $(patsubst libutils,liblog libutils,$(1)) \
+     ) \
+   )
+endef
+ifneq (,$(filter libcutils libutils,$(LOCAL_SHARED_LIBRARIES)))
+  LOCAL_SHARED_LIBRARIES := $(call insert-liblog,$(LOCAL_SHARED_LIBRARIES))
+endif
+ifneq (,$(filter libcutils libutils,$(LOCAL_STATIC_LIBRARIES)))
+  LOCAL_STATIC_LIBRARIES := $(call insert-liblog,$(LOCAL_STATIC_LIBRARIES))
+endif
+ifneq (,$(filter libcutils libutils,$(LOCAL_WHOLE_STATIC_LIBRARIES)))
+  LOCAL_WHOLE_STATIC_LIBRARIES := $(call insert-liblog,$(LOCAL_WHOLE_STATIC_LIBRARIES))
+endif
+
 ifdef LOCAL_SDK_VERSION
   # Get the list of INSTALLED libraries as module names.
   # We cannot compute the full path of the LOCAL_SHARED_LIBRARIES for
index 5542280..089c68b 100644 (file)
@@ -16,8 +16,7 @@ LOCAL_C_INCLUDES += external/zlib
 
 LOCAL_STATIC_LIBRARIES := \
        libutils \
-       libcutils \
-       liblog
+       libcutils
 
 ifeq ($(HOST_OS),linux)
 LOCAL_LDLIBS += -lrt
@@ -36,3 +35,4 @@ endif # BUILD_HOST_static
 LOCAL_MODULE := zipalign
 
 include $(BUILD_HOST_EXECUTABLE)
+