Merge "Support arch variants in java's StaticLibs in bp2build" am: b2539d08ed
am: 090223b966
am: d2c9df6b93
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2521437 Change-Id: If15fb36748be5ee25aa5783dc1c04437e8edc910 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
17
java/java.go
17
java/java.go
@@ -2904,10 +2904,6 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
|
||||
}
|
||||
}
|
||||
|
||||
if m.properties.Static_libs != nil {
|
||||
staticDeps.Append(android.BazelLabelForModuleDeps(ctx, android.LastUniqueStrings(android.CopyOf(m.properties.Static_libs))))
|
||||
}
|
||||
|
||||
protoDepLabel := bp2buildProto(ctx, &m.Module, srcPartitions[protoSrcPartition])
|
||||
// Soong does not differentiate between a java_library and the Bazel equivalent of
|
||||
// a java_proto_library + proto_library pair. Instead, in Soong proto sources are
|
||||
@@ -2919,7 +2915,18 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
|
||||
|
||||
depLabels := &javaDependencyLabels{}
|
||||
depLabels.Deps = deps
|
||||
depLabels.StaticDeps = bazel.MakeLabelListAttribute(staticDeps)
|
||||
|
||||
for axis, configToProps := range archVariantProps {
|
||||
for config, _props := range configToProps {
|
||||
if archProps, ok := _props.(*CommonProperties); ok {
|
||||
archStaticLibs := android.BazelLabelForModuleDeps(
|
||||
ctx,
|
||||
android.LastUniqueStrings(android.CopyOf(archProps.Static_libs)))
|
||||
depLabels.StaticDeps.SetSelectValue(axis, config, archStaticLibs)
|
||||
}
|
||||
}
|
||||
}
|
||||
depLabels.StaticDeps.Value.Append(staticDeps)
|
||||
|
||||
hasKotlin := !kotlinSrcs.IsEmpty()
|
||||
commonAttrs.kotlinAttributes = &kotlinAttributes{
|
||||
|
Reference in New Issue
Block a user