Merge "Revert "Revert "bp2build: convert host & prebuilt header libraries""" am: e844132b85 am: 86151370ef am: d490d54259 am: 4e491af625

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

Change-Id: Ib4eef6beb896c9586a0fdf9a3d45179447fbb553
This commit is contained in:
Liz Kammer
2022-01-12 14:18:03 +00:00
committed by Automerger Merge Worker
4 changed files with 7 additions and 3 deletions

View File

@@ -3490,9 +3490,7 @@ func (c *Module) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
libraryBp2Build(ctx, c)
}
} else if !static && !shared {
if !prebuilt {
libraryHeadersBp2Build(ctx, c)
}
libraryHeadersBp2Build(ctx, c)
} else if static {
if prebuilt {
prebuiltLibraryStaticBp2Build(ctx, c)

View File

@@ -443,6 +443,8 @@ func LibraryHostStaticFactory() android.Module {
module, library := NewLibrary(android.HostSupported)
library.BuildOnlyStatic()
module.sdkMemberTypes = []android.SdkMemberType{staticLibrarySdkMemberType}
module.bazelable = true
module.bazelHandler = &ccLibraryBazelHandler{module: module}
return module.Init()
}

View File

@@ -104,6 +104,8 @@ func LibraryHeaderFactory() android.Module {
func prebuiltLibraryHeaderFactory() android.Module {
module, library := NewPrebuiltLibrary(android.HostAndDeviceSupported, "")
library.HeaderOnly()
module.bazelable = true
module.bazelHandler = &ccLibraryBazelHandler{module: module}
return module.Init()
}