diff --git a/libselinux/Android.bp b/libselinux/Android.bp index 57d3a362..649e6528 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; }