Multi-tree API bp2build converter for ndk_library
This is a partial bp2build conversion that only emits the
cc_api_contribution target of ndk_library. We also need to convert this
to cc_stub_suite eventually to enable building vendor/product API
domains with Bazel
Also create an enum for the three known Multi-tree API surfaces (will
likely be expanded in the future)
Test: go test ./bp2build
Test: b cquery //bionic/libc:libc.ndk.contribution --output=starlark
--starlark:expr="providers(target)"
Change-Id: Idb24871ba20aae132b61eb31ef35c917cacae9e1
diff --git a/cc/cc.go b/cc/cc.go
index d42ab6d..1c845f6 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -3650,6 +3650,7 @@
sharedLibrary
headerLibrary
testBin // testBinary already declared
+ ndkLibrary
)
func (c *Module) typ() moduleType {
@@ -3686,6 +3687,8 @@
return staticLibrary
}
return sharedLibrary
+ } else if c.isNDKStubLibrary() {
+ return ndkLibrary
}
return unknownType
}
@@ -3726,6 +3729,8 @@
} else {
sharedOrStaticLibraryBp2Build(ctx, c, false)
}
+ case ndkLibrary:
+ ndkLibraryBp2build(ctx, c)
}
}