Merge "Non-installable module should not be installed into a fuzzer .zip package" am: cd821d8283

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie26209bf63286899a954c352c2475541dbd56f62
This commit is contained in:
vichang 2021-02-18 10:15:10 +00:00 committed by Automerger Merge Worker
commit 8c488d9075
1 changed files with 8 additions and 1 deletions

View File

@ -20,6 +20,8 @@ import (
"sort"
"strings"
"github.com/google/blueprint/proptools"
"android/soong/android"
"android/soong/cc/config"
)
@ -172,7 +174,7 @@ func collectAllSharedDependencies(ctx android.SingletonContext, module android.M
// This function takes a module and determines if it is a unique shared library
// that should be installed in the fuzz target output directories. This function
// returns true, unless:
// - The module is not a shared library, or
// - The module is not an installable shared library, or
// - The module is a header, stub, or vendor-linked library, or
// - The module is a prebuilt and its source is available, or
// - The module is a versioned member of an SDK snapshot.
@ -209,6 +211,11 @@ func isValidSharedDependency(dependency android.Module) bool {
if _, isLLndkStubLibrary := ccLibrary.linker.(*stubDecorator); isLLndkStubLibrary {
return false
}
// Discard installable:false libraries because they are expected to be absent
// in runtime.
if !proptools.BoolDefault(ccLibrary.Properties.Installable, true) {
return false
}
}
// If the same library is present both as source and a prebuilt we must pick