bp2build: convert host & prebuilt header libraries
Test: bp2build.sh Change-Id: If8165eac7c17c4eef3686067257aa792121db59d
This commit is contained in:
4
cc/cc.go
4
cc/cc.go
@@ -3476,9 +3476,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)
|
||||
|
@@ -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()
|
||||
}
|
||||
|
||||
|
@@ -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()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user