bp2build: cc_library converter for //bionic/libdl:libdl_android
This CL contains the converter for libdl_android, a cc_library that
expands into a cc_shared_library and a regular cc_library.
Test: TH
Test: bp2build; bazel test //build/bazel/tests/...
Change-Id: If70641a538211b0d6b2aac0e4d0d06912318304d
diff --git a/cc/object.go b/cc/object.go
index 4f8797d..de45293 100644
--- a/cc/object.go
+++ b/cc/object.go
@@ -113,6 +113,7 @@
// For bp2build conversion.
type bazelObjectAttributes struct {
Srcs bazel.LabelListAttribute
+ Hdrs bazel.LabelListAttribute
Deps bazel.LabelListAttribute
Copts bazel.StringListAttribute
Asflags []string
@@ -156,16 +157,11 @@
}
// Set arch-specific configurable attributes
- var srcs bazel.LabelListAttribute
+ copts, srcs, hdrs := bp2BuildParseCompilerProps(ctx, m)
var localIncludeDirs []string
var asFlags []string
for _, props := range m.compiler.compilerProps() {
if baseCompilerProps, ok := props.(*BaseCompilerProperties); ok {
- srcs = bazel.MakeLabelListAttribute(
- android.BazelLabelForModuleSrcExcludes(
- ctx,
- baseCompilerProps.Srcs,
- baseCompilerProps.Exclude_srcs))
localIncludeDirs = baseCompilerProps.Local_include_dirs
break
}
@@ -208,8 +204,9 @@
attrs := &bazelObjectAttributes{
Srcs: srcs,
+ Hdrs: hdrs,
Deps: deps,
- Copts: bp2BuildParseCflags(ctx, m),
+ Copts: copts,
Asflags: asFlags,
Local_include_dirs: localIncludeDirs,
}