Merge changes I88973671,If5a3b53a
am: 2406a123ba
Change-Id: Id7649534555602f7a3716d570ca88d93330fae75
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
package android
|
package android
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
@@ -86,7 +87,9 @@ type ApexModuleBase struct {
|
|||||||
ApexProperties ApexProperties
|
ApexProperties ApexProperties
|
||||||
|
|
||||||
canHaveApexVariants bool
|
canHaveApexVariants bool
|
||||||
apexVariations []string
|
|
||||||
|
apexVariationsLock sync.Mutex // protects apexVariations during parallel apexDepsMutator
|
||||||
|
apexVariations []string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ApexModuleBase) apexModuleBase() *ApexModuleBase {
|
func (m *ApexModuleBase) apexModuleBase() *ApexModuleBase {
|
||||||
@@ -94,6 +97,8 @@ func (m *ApexModuleBase) apexModuleBase() *ApexModuleBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *ApexModuleBase) BuildForApex(apexName string) {
|
func (m *ApexModuleBase) BuildForApex(apexName string) {
|
||||||
|
m.apexVariationsLock.Lock()
|
||||||
|
defer m.apexVariationsLock.Unlock()
|
||||||
if !InList(apexName, m.apexVariations) {
|
if !InList(apexName, m.apexVariations) {
|
||||||
m.apexVariations = append(m.apexVariations, apexName)
|
m.apexVariations = append(m.apexVariations, apexName)
|
||||||
}
|
}
|
||||||
@@ -122,6 +127,7 @@ func (m *ApexModuleBase) IsInstallableToApex() bool {
|
|||||||
|
|
||||||
func (m *ApexModuleBase) CreateApexVariations(mctx BottomUpMutatorContext) []blueprint.Module {
|
func (m *ApexModuleBase) CreateApexVariations(mctx BottomUpMutatorContext) []blueprint.Module {
|
||||||
if len(m.apexVariations) > 0 {
|
if len(m.apexVariations) > 0 {
|
||||||
|
sort.Strings(m.apexVariations)
|
||||||
variations := []string{""} // Original variation for platform
|
variations := []string{""} // Original variation for platform
|
||||||
variations = append(variations, m.apexVariations...)
|
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
|
var modulePathTxtBuilder strings.Builder
|
||||||
|
|
||||||
|
modulePaths := modulePaths(ctx.Config())
|
||||||
|
var libs []string
|
||||||
|
for lib := range modulePaths {
|
||||||
|
libs = append(libs, lib)
|
||||||
|
}
|
||||||
|
sort.Strings(libs)
|
||||||
|
|
||||||
first := true
|
first := true
|
||||||
for lib, dir := range modulePaths(ctx.Config()) {
|
for _, lib := range libs {
|
||||||
if first {
|
if first {
|
||||||
first = false
|
first = false
|
||||||
} else {
|
} else {
|
||||||
@@ -539,7 +546,7 @@ func (c *vndkSnapshotSingleton) GenerateBuildActions(ctx android.SingletonContex
|
|||||||
}
|
}
|
||||||
modulePathTxtBuilder.WriteString(lib)
|
modulePathTxtBuilder.WriteString(lib)
|
||||||
modulePathTxtBuilder.WriteString(".so ")
|
modulePathTxtBuilder.WriteString(".so ")
|
||||||
modulePathTxtBuilder.WriteString(dir)
|
modulePathTxtBuilder.WriteString(modulePaths[lib])
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
|
Reference in New Issue
Block a user