aboutsummaryrefslogtreecommitdiffstats
path: root/cc/util.go
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2017-06-16 12:03:55 +0900
committerJiyong Park <jiyong@google.com>2017-06-21 10:13:27 +0900
commit44cf1a777916fbe2dc03760b0f2076c4cd3a0f63 (patch)
tree8e621b3b6fd467cdcbe631fd04669f8e387e1684 /cc/util.go
parent83cf1cee583dc50c928ea27082e54aa815932ea4 (diff)
downloadbuild_soong-44cf1a777916fbe2dc03760b0f2076c4cd3a0f63.tar.gz
build_soong-44cf1a777916fbe2dc03760b0f2076c4cd3a0f63.tar.bz2
build_soong-44cf1a777916fbe2dc03760b0f2076c4cd3a0f63.zip
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
Diffstat (limited to 'cc/util.go')
-rw-r--r--cc/util.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/cc/util.go b/cc/util.go
index d9cd6f77..eeb64eb3 100644
--- a/cc/util.go
+++ b/cc/util.go
@@ -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 {