add exclude_shared_libs for vendor_available:true libs

Adding a mechanism to conditionally exclude some shared library
dependencies when a lib is built for vendors.

Without this, some libraries cannot be earily marked as vendor_available
if they are depending on shared libs can shouldn't be marked as
vendor_available.

By using exclude_shared_libs with exclude_srcs (or __ANDROID_VNDK__
macro), we can eliminate the unnecessary dependency for vendors.

Bug: 62471389
Test: build

Change-Id: If94277b45c3769223cea371d0028e75277640356
This commit is contained in:
Jiyong Park
2017-06-16 12:03:55 +09:00
parent 83cf1cee58
commit 44cf1a7779
2 changed files with 22 additions and 0 deletions

View File

@@ -66,6 +66,16 @@ func filterList(list []string, filter []string) (remainder []string, filtered []
return
}
func removeListFromList(list []string, filter_out []string) (result []string) {
result = make([]string, 0, len(list))
for _, l := range list {
if !inList(l, filter_out) {
result = append(result, l)
}
}
return
}
func removeFromList(s string, list []string) (bool, []string) {
i := indexList(s, list)
if i != -1 {