cc bazel handlers: use better interface checking
This is a far better approach for ensuring that bazel handlers implement
the BazelHandler interface, as it causes a compile error if they do not
implement the appropriate interface methods.
Test: Manually verified no change in ninja file
Change-Id: I63a4f8b57e3aedd4c0915c2fd2eb7029e9a993aa
diff --git a/cc/prebuilt.go b/cc/prebuilt.go
index e8c60ba..4120237 100644
--- a/cc/prebuilt.go
+++ b/cc/prebuilt.go
@@ -407,12 +407,12 @@
}
type prebuiltStaticLibraryBazelHandler struct {
- BazelHandler
-
module *Module
library *libraryDecorator
}
+var _ BazelHandler = (*prebuiltStaticLibraryBazelHandler)(nil)
+
func (h *prebuiltStaticLibraryBazelHandler) QueueBazelCall(ctx android.BaseModuleContext, label string) {
bazelCtx := ctx.Config().BazelContext
bazelCtx.QueueBazelRequest(label, cquery.GetCcInfo, android.GetConfigKey(ctx))
@@ -458,12 +458,12 @@
}
type prebuiltSharedLibraryBazelHandler struct {
- BazelHandler
-
module *Module
library *libraryDecorator
}
+var _ BazelHandler = (*prebuiltSharedLibraryBazelHandler)(nil)
+
func (h *prebuiltSharedLibraryBazelHandler) QueueBazelCall(ctx android.BaseModuleContext, label string) {
bazelCtx := ctx.Config().BazelContext
bazelCtx.QueueBazelRequest(label, cquery.GetCcInfo, android.GetConfigKey(ctx))