Merge changes I88973671,If5a3b53a am: 2406a123ba
am: 5a927378ea
Change-Id: Ibba9c6d25e075943ffd8d91ee5929a9b591bd25a
This commit is contained in:
commit
9cc712aa51
2 changed files with 16 additions and 3 deletions
|
@ -15,6 +15,7 @@
|
|||
package android
|
||||
|
||||
import (
|
||||
"sort"
|
||||
"sync"
|
||||
|
||||
"github.com/google/blueprint"
|
||||
|
@ -86,7 +87,9 @@ type ApexModuleBase struct {
|
|||
ApexProperties ApexProperties
|
||||
|
||||
canHaveApexVariants bool
|
||||
apexVariations []string
|
||||
|
||||
apexVariationsLock sync.Mutex // protects apexVariations during parallel apexDepsMutator
|
||||
apexVariations []string
|
||||
}
|
||||
|
||||
func (m *ApexModuleBase) apexModuleBase() *ApexModuleBase {
|
||||
|
@ -94,6 +97,8 @@ func (m *ApexModuleBase) apexModuleBase() *ApexModuleBase {
|
|||
}
|
||||
|
||||
func (m *ApexModuleBase) BuildForApex(apexName string) {
|
||||
m.apexVariationsLock.Lock()
|
||||
defer m.apexVariationsLock.Unlock()
|
||||
if !InList(apexName, m.apexVariations) {
|
||||
m.apexVariations = append(m.apexVariations, apexName)
|
||||
}
|
||||
|
@ -122,6 +127,7 @@ func (m *ApexModuleBase) IsInstallableToApex() bool {
|
|||
|
||||
func (m *ApexModuleBase) CreateApexVariations(mctx BottomUpMutatorContext) []blueprint.Module {
|
||||
if len(m.apexVariations) > 0 {
|
||||
sort.Strings(m.apexVariations)
|
||||
variations := []string{""} // Original variation for platform
|
||||
variations = append(variations, m.apexVariations...)
|
||||
|
||||
|
|
11
cc/vndk.go
11
cc/vndk.go
|
@ -530,8 +530,15 @@ func (c *vndkSnapshotSingleton) GenerateBuildActions(ctx android.SingletonContex
|
|||
|
||||
var modulePathTxtBuilder strings.Builder
|
||||
|
||||
modulePaths := modulePaths(ctx.Config())
|
||||
var libs []string
|
||||
for lib := range modulePaths {
|
||||
libs = append(libs, lib)
|
||||
}
|
||||
sort.Strings(libs)
|
||||
|
||||
first := true
|
||||
for lib, dir := range modulePaths(ctx.Config()) {
|
||||
for _, lib := range libs {
|
||||
if first {
|
||||
first = false
|
||||
} else {
|
||||
|
@ -539,7 +546,7 @@ func (c *vndkSnapshotSingleton) GenerateBuildActions(ctx android.SingletonContex
|
|||
}
|
||||
modulePathTxtBuilder.WriteString(lib)
|
||||
modulePathTxtBuilder.WriteString(".so ")
|
||||
modulePathTxtBuilder.WriteString(dir)
|
||||
modulePathTxtBuilder.WriteString(modulePaths[lib])
|
||||
}
|
||||
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
|
|
Loading…
Reference in a new issue