bp2build: cc_library_headers converter should only include that module type
Test: bp2build; bazel build //bionic/...
Change-Id: I34768b51098c5b801e7c6d9b3a95ec0f37c3bb09
diff --git a/cc/library_headers.go b/cc/library_headers.go
index dc851a5..115b775 100644
--- a/cc/library_headers.go
+++ b/cc/library_headers.go
@@ -90,15 +90,11 @@
return
}
- lib, ok := module.linker.(*libraryDecorator)
- if !ok {
- // Not a cc_library module
+ if ctx.ModuleType() != "cc_library_headers" {
return
}
- if !lib.header() {
- // Not a cc_library_headers module
- return
- }
+
+ lib, _ := module.linker.(*libraryDecorator)
// list of directories that will be added to the include path (using -I) for this
// module and any module that links against this module.