aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cc/config/toolchain.go16
-rw-r--r--java/java.go10
2 files changed, 3 insertions, 23 deletions
diff --git a/cc/config/toolchain.go b/cc/config/toolchain.go
index 796ccfb6..471db1de 100644
--- a/cc/config/toolchain.go
+++ b/cc/config/toolchain.go
@@ -199,20 +199,6 @@ func addPrefix(list []string, prefix string) []string {
return list
}
-func indexList(s string, list []string) int {
- for i, l := range list {
- if l == s {
- return i
- }
- }
-
- return -1
-}
-
-func inList(s string, list []string) bool {
- return indexList(s, list) != -1
-}
-
func SanitizerRuntimeLibrary(t Toolchain, sanitizer string) string {
arch := t.SanitizerRuntimeLibraryArch()
if arch == "" {
@@ -243,3 +229,5 @@ func ToolPath(t Toolchain) string {
}
return filepath.Join(t.GccRoot(), t.GccTriple(), "bin")
}
+
+var inList = android.InList
diff --git a/java/java.go b/java/java.go
index 9d2074fe..65bd4383 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1252,15 +1252,6 @@ func ImportFactoryHost() android.Module {
return module
}
-func inList(s string, l []string) bool {
- for _, e := range l {
- if e == s {
- return true
- }
- }
- return false
-}
-
//
// Defaults
//
@@ -1295,3 +1286,4 @@ func DefaultsFactory(props ...interface{}) android.Module {
var Bool = proptools.Bool
var String = proptools.String
+var inList = android.InList