Merge "Add GetEmbeddedPrebuilt and IsModulePrebuilt" am: 6065b0666a am: d6dcaa9cfd am: 3aa5cc2d5b

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689388

Change-Id: I9a26bccb457bdba5a426ff4403d6181f41aa0e2c
This commit is contained in:
Treehugger Robot
2021-04-28 20:24:38 +00:00
committed by Automerger Merge Worker
4 changed files with 44 additions and 28 deletions

View File

@@ -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
}