Add RemoveOptionalPrebuiltPrefix() helper function

Test: m nothing
Bug: 171061220
Change-Id: Iaca95efcaf3f02e066751c6e988d609ac40e048a
This commit is contained in:
Paul Duffin
2020-12-11 18:13:08 +00:00
parent a7d6a89774
commit d23c726b36
3 changed files with 9 additions and 2 deletions

View File

@@ -2178,7 +2178,7 @@ func baselineApexAvailable(apex, moduleName string) bool {
func normalizeModuleName(moduleName string) string {
// Prebuilt modules (e.g. java_import, etc.) have "prebuilt_" prefix added by the build
// system. Trim the prefix for the check since they are confusing
moduleName = strings.TrimPrefix(moduleName, "prebuilt_")
moduleName = android.RemoveOptionalPrebuiltPrefix(moduleName)
if strings.HasPrefix(moduleName, "libclang_rt.") {
// This module has many arch variants that depend on the product being built.
// We don't want to list them all