From 57071adff48ef2e4d1e80726f2ae7ef769614164 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Fri, 13 Oct 2017 09:17:27 +0900 Subject: [PATCH] Remove libselinux_vendor libselinux_vendor is removed and merged to libselinux by using vendor_available:true. Bug: 66914194 Test: lunch aosp_arm64_ab-userdebug; m libselinux.vendor Change-Id: Idc04eccf8a9803b9acf6277a9d078a1528ed29c9 --- libselinux/Android.bp | 31 +++++++++++-------------- libselinux/src/android/android_vendor.c | 4 ++-- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/libselinux/Android.bp b/libselinux/Android.bp index 220e953e..d353c067 100644 --- a/libselinux/Android.bp +++ b/libselinux/Android.bp @@ -102,26 +102,10 @@ cc_defaults { export_include_dirs: ["include"], } -cc_library_shared { - name: "libselinux_vendor", - defaults: ["libselinux_defaults"], - vendor: true, - cflags: ["-DNO_FILE_BACKEND"], - - target: { - android: { - version_script: "exported_vendor.map", - }, - }, - - srcs: [ - "src/android/android_vendor.c", - ], -} - cc_library { name: "libselinux", defaults: ["libselinux_defaults"], + vendor_available: true, host_supported: true, cflags: ["-DUSE_PCRE2"], @@ -192,6 +176,19 @@ cc_library { version_script: "exported.map", }, + + vendor: { + exclude_srcs: [ + "src/android/android_platform.c", + ], + srcs: [ + "src/android/android_vendor.c", + ], + cflags: ["-DNO_FILE_BACKEND"], + exclude_shared_libs: ["libpackagelistparser"], + exclude_static_libs: ["libpackagelistparser"], + version_script: "exported_vendor.map", + }, }, static: { diff --git a/libselinux/src/android/android_vendor.c b/libselinux/src/android/android_vendor.c index 45af4c6d..82fea4dd 100644 --- a/libselinux/src/android/android_vendor.c +++ b/libselinux/src/android/android_vendor.c @@ -3,12 +3,12 @@ int selinux_android_restorecon(const char *file __attribute__((unused)), unsigned int flags __attribute__((unused))) { - selinux_log(SELINUX_ERROR, "%s: not implemented for libselinux_vendor\n", __FUNCTION__); + selinux_log(SELINUX_ERROR, "%s: not implemented for vendor variant of libselinux\n", __FUNCTION__); return -1; } struct selabel_handle* selinux_android_prop_context_handle(void) { - selinux_log(SELINUX_ERROR, "%s: not implemented for libselinux_vendor\n", __FUNCTION__); + selinux_log(SELINUX_ERROR, "%s: not implemented for vendor variant of libselinux\n", __FUNCTION__); return NULL; }