Do not add dependencies from disabled sdk variants to its members
If an sdk variant is disabled (e.g. say windows) then it should not add dependencies on corresponding sdk member variants as if those variants have not been created then the build breaks unnecessarily. This is needed to make progress on unbundling art which provides at least one host tool (dex2oat) that is not supported on all platforms and some (hiddenapi) that only produce 64 bit versions. Initially, the art prebuilts will only support building 64 bit versions of linux host tools. Bug: 142935992 Test: m art-module-sdk art-module-host-exports art-module-test-exports Change-Id: Idfbb40bb3cabc6eb731a2b38f045ed14f0a713cc
This commit is contained in:
parent
53fe467c67
commit
583bf7ebf7
10
sdk/sdk.go
10
sdk/sdk.go
|
@ -320,10 +320,12 @@ func (t sdkMemberVersionedDepTag) ExcludeFromVisibilityEnforcement() {}
|
|||
// Step 1: create dependencies from an SDK module to its members.
|
||||
func memberMutator(mctx android.BottomUpMutatorContext) {
|
||||
if s, ok := mctx.Module().(*sdk); ok {
|
||||
for _, memberListProperty := range s.memberListProperties() {
|
||||
names := memberListProperty.getter(s.dynamicMemberTypeListProperties)
|
||||
tag := memberListProperty.dependencyTag
|
||||
memberListProperty.memberType.AddDependencies(mctx, tag, names)
|
||||
if s.Enabled() {
|
||||
for _, memberListProperty := range s.memberListProperties() {
|
||||
names := memberListProperty.getter(s.dynamicMemberTypeListProperties)
|
||||
tag := memberListProperty.dependencyTag
|
||||
memberListProperty.memberType.AddDependencies(mctx, tag, names)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue