Revert "Revert "bp2build: convert host & prebuilt header libraries""
This reverts commit 105deedfc7879a0e2d2c1ed9f0dcb7793b716513.
Reason for revert: Revert with forward fix
Change-Id: Ib0b6f6b1cbb011b4c5f2133e1cc15ec76ff29253
diff --git a/cc/cc.go b/cc/cc.go
index 281ebc1..82b7c87 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -3476,9 +3476,7 @@
libraryBp2Build(ctx, c)
}
} else if !static && !shared {
- if !prebuilt {
- libraryHeadersBp2Build(ctx, c)
- }
+ libraryHeadersBp2Build(ctx, c)
} else if static {
if prebuilt {
prebuiltLibraryStaticBp2Build(ctx, c)
diff --git a/cc/library.go b/cc/library.go
index 5720944..b18f90d 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -443,6 +443,8 @@
module, library := NewLibrary(android.HostSupported)
library.BuildOnlyStatic()
module.sdkMemberTypes = []android.SdkMemberType{staticLibrarySdkMemberType}
+ module.bazelable = true
+ module.bazelHandler = &ccLibraryBazelHandler{module: module}
return module.Init()
}
diff --git a/cc/library_headers.go b/cc/library_headers.go
index 70e4715..064e2b8 100644
--- a/cc/library_headers.go
+++ b/cc/library_headers.go
@@ -104,6 +104,8 @@
func prebuiltLibraryHeaderFactory() android.Module {
module, library := NewPrebuiltLibrary(android.HostAndDeviceSupported, "")
library.HeaderOnly()
+ module.bazelable = true
+ module.bazelHandler = &ccLibraryBazelHandler{module: module}
return module.Init()
}