Make libseliux a stub library

libselinux is currently being copied to APEXes. This is risky because
the library is not designed to be portable; part of it is tied to the
specific version of the Android that it was developed for.

This change fixes the problem by declaring that the library supports
a stub with the list of C APIs that are included in the stub. Then there
is only one copy of libselinux in /system/lib and other APEXes use the
copy by dynamically linking to it.

Bug: 151053366
Test: m It doesn't include libselinux in it.
Test: m then inspect
out/soong/ The dependency to libselinux
is shown as '(external)'.

Change-Id: I8faf344f3984437e313745e5eda5fdb8e75ce8ab
1 file changed