Add GetEmbeddedPrebuilt and IsModulePrebuilt
Dedups the many repetitions of the code to obtain a *Prebuilt from a module. Bug: 177892522 Test: m nothing Change-Id: I1ededbe9ee79e89ea6dd8882dfee4be0bf0b51b7
This commit is contained in:
@@ -221,8 +221,7 @@ func isValidSharedDependency(dependency android.Module) bool {
|
||||
// If the same library is present both as source and a prebuilt we must pick
|
||||
// only one to avoid a conflict. Always prefer the source since the prebuilt
|
||||
// probably won't be built with sanitizers enabled.
|
||||
if prebuilt, ok := dependency.(android.PrebuiltInterface); ok &&
|
||||
prebuilt.Prebuilt() != nil && prebuilt.Prebuilt().SourceExists() {
|
||||
if prebuilt := android.GetEmbeddedPrebuilt(dependency); prebuilt != nil && prebuilt.SourceExists() {
|
||||
return false
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user