Merge "Refactor BazelTargetModule"

This commit is contained in:
Treehugger Robot
2021-02-23 20:40:23 +00:00
committed by Gerrit Code Review
10 changed files with 85 additions and 102 deletions

View File

@@ -129,13 +129,12 @@ func CcLibraryHeadersBp2Build(ctx android.TopDownMutatorContext) {
Deps: headerLibLabels,
}
props := bazel.NewBazelTargetModuleProperties(
module.Name(),
"cc_library_headers",
"//build/bazel/rules:cc_library_headers.bzl",
)
props := bazel.BazelTargetModuleProperties{
Rule_class: "cc_library_headers",
Bzl_load_location: "//build/bazel/rules:cc_library_headers.bzl",
}
ctx.CreateBazelTargetModule(BazelCcLibraryHeadersFactory, props, attrs)
ctx.CreateBazelTargetModule(BazelCcLibraryHeadersFactory, module.Name(), props, attrs)
}
func (m *bazelCcLibraryHeaders) Name() string {

View File

@@ -150,13 +150,12 @@ func ObjectBp2Build(ctx android.TopDownMutatorContext) {
Local_include_dirs: localIncludeDirs,
}
props := bazel.NewBazelTargetModuleProperties(
m.Name(),
"cc_object",
"//build/bazel/rules:cc_object.bzl",
)
props := bazel.BazelTargetModuleProperties{
Rule_class: "cc_object",
Bzl_load_location: "//build/bazel/rules:cc_object.bzl",
}
ctx.CreateBazelTargetModule(BazelObjectFactory, props, attrs)
ctx.CreateBazelTargetModule(BazelObjectFactory, m.Name(), props, attrs)
}
func (object *objectLinker) appendLdflags(flags []string) {