Fix variant errors when compiling with the NDK
This was corrupting the nonvariants list with the variants list whenever
it hit the else case, causing a missing variant issue, since we need to
use the variant when linking against lib*.ndk.
Test: aosp_arm build.ninja is the same before/after
Test: https://android-review.googlesource.com/c/355163/, set
BOARD_VNDK_VERSION := current
Change-Id: I047937e838464670d0902506871d2203ec8cc17d
diff --git a/cc/cc.go b/cc/cc.go
index 4c69723..b27e8ee 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -675,7 +675,7 @@
variantLibs = append(variantLibs, entry+ndkLibrarySuffix)
}
} else {
- nonvariantLibs = append(variantLibs, entry)
+ nonvariantLibs = append(nonvariantLibs, entry)
}
}
return nonvariantLibs, variantLibs