aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2017-07-10 18:09:40 +0000
committerYifan Hong <elsk@google.com>2017-07-10 20:52:28 +0000
commitb685190e74b562146479e2fc7ced58358a64def3 (patch)
treeee900ff5ccdb369d6458767e31686d25c7c28464
parent9659c8372a8eb049b32c6af9686557c418979add (diff)
downloadtoybox-b685190e74b562146479e2fc7ced58358a64def3.tar.gz
Fix toybox_vendor dependencies on libselinux_vendor.
toybox_vendor now links to other libraries as shared libraries. This allows toybox_vendor to use the "vendor" version of these libraries (in particular, liblog and libselinx_vendor). Test: mma -j Test: m -j, flash, boots Test: `adb shell /vendor/bin/restorecon /dev/null` shows error message Test: `adb shell /vendor/bin/getprop -Z' shows error message Test: mma -j BOARD_VNDK_VERSION=current Bug: 62886649 (revert of commit 4ab405afe2668a5ca25be411df2d05a5e0995478) (resubmit of commit e06cffe06993e0ade6f7836becb26e7f076c8a68) Change-Id: I0812b58eb3d769d1a73e64009481075c09da2450
-rw-r--r--Android.mk13
1 files changed, 7 insertions, 6 deletions
diff --git a/Android.mk b/Android.mk
index 78b794b1..c1d59599 100644
--- a/Android.mk
+++ b/Android.mk
@@ -228,7 +228,11 @@ toybox_upstream_version := $(shell sed 's/#define.*TOYBOX_VERSION.*"\(.*\)"/\1/p
toybox_version := $(toybox_upstream_version)-android-$(BUILD_NUMBER_FROM_FILE)
-toybox_libraries := liblog libselinux libcutils libcrypto libz
+toybox_common_libraries := liblog libcutils libcrypto libz
+
+toybox_libraries := $(toybox_common_libraries) libselinux
+
+toybox_vendor_libraries := $(toybox_common_libraries) libselinux_vendor
common_CFLAGS += -DTOYBOX_VERSION=\"$(toybox_version)\"
@@ -406,7 +410,7 @@ LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf toybox $(TARGE
include $(BUILD_EXECUTABLE)
############################################
-# static version to be installed in /vendor
+# toybox for /vendor
############################################
include $(CLEAR_VARS)
@@ -414,11 +418,8 @@ LOCAL_MODULE := toybox_vendor
LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := $(common_SRC_FILES)
LOCAL_CFLAGS := $(common_CFLAGS)
-LOCAL_STATIC_LIBRARIES := $(toybox_libraries)
-# libc++_static is needed by static liblog
-LOCAL_CXX_STL := libc++_static
+LOCAL_SHARED_LIBRARIES := $(toybox_vendor_libraries)
LOCAL_MODULE_TAGS := optional
-LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf ${LOCAL_MODULE} $(TARGET_OUT_VENDOR_EXECUTABLES)/$(t);)
include $(BUILD_EXECUTABLE)