Merge "Bp2Build common properties auto-handling" am: d905146590

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1815376

Change-Id: I38f1063302ea90583a51e625076e6232b4364ab7
This commit is contained in:
Treehugger Robot
2021-10-04 19:20:28 +00:00
committed by Automerger Merge Worker
18 changed files with 229 additions and 51 deletions

View File

@@ -345,7 +345,7 @@ func CcLibraryBp2Build(ctx android.TopDownMutatorContext) {
Bzl_load_location: "//build/bazel/rules:full_cc_library.bzl",
}
ctx.CreateBazelTargetModule(m.Name(), props, attrs)
ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: m.Name()}, attrs)
}
// cc_library creates both static and/or shared libraries for a device and/or
@@ -2440,7 +2440,7 @@ func ccSharedOrStaticBp2BuildMutatorInternal(ctx android.TopDownMutatorContext,
Bzl_load_location: fmt.Sprintf("//build/bazel/rules:%s.bzl", modType),
}
ctx.CreateBazelTargetModule(module.Name(), props, attrs)
ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, attrs)
}
// TODO(b/199902614): Can this be factored to share with the other Attributes?

View File

@@ -147,5 +147,5 @@ func CcLibraryHeadersBp2Build(ctx android.TopDownMutatorContext) {
Bzl_load_location: "//build/bazel/rules:cc_library_headers.bzl",
}
ctx.CreateBazelTargetModule(module.Name(), props, attrs)
ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: module.Name()}, attrs)
}

View File

@@ -206,7 +206,7 @@ func ObjectBp2Build(ctx android.TopDownMutatorContext) {
Bzl_load_location: "//build/bazel/rules:cc_object.bzl",
}
ctx.CreateBazelTargetModule(m.Name(), props, attrs)
ctx.CreateBazelTargetModule(props, android.CommonAttributes{Name: m.Name()}, attrs)
}
func (object *objectLinker) appendLdflags(flags []string) {