diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-06-06 06:36:44 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-06-06 06:36:44 +0000 |
commit | 901abff2af392334bf39ca62d6505deb62c097fe (patch) | |
tree | 711f03740dfcbebe46de8d512b09831096965931 | |
parent | 364d70e29614dd0e787a2598b6da6b0b651b0618 (diff) | |
parent | ea68aad696009447d2db7be5bcbba60ac6d8f7a0 (diff) | |
download | build_soong-901abff2af392334bf39ca62d6505deb62c097fe.tar.gz build_soong-901abff2af392334bf39ca62d6505deb62c097fe.tar.bz2 build_soong-901abff2af392334bf39ca62d6505deb62c097fe.zip |
Snap for 5637134 from ea68aad696009447d2db7be5bcbba60ac6d8f7a0 to qt-release
Change-Id: I425b783f960b91c21b4d18ded01a9fa262e20673
-rw-r--r-- | android/apex.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/android/apex.go b/android/apex.go index bf11ba25..17df7624 100644 --- a/android/apex.go +++ b/android/apex.go @@ -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...) |