bp2build; Update handling of linker flags
Test: build/bazel/ci/bp2build.sh
Bug: 197920036
Change-Id: I6e3100574fa0e40bcd8cf0e6af0efd3310aa41bf
diff --git a/cc/library.go b/cc/library.go
index 58e0e21..0cffd56 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -259,6 +259,8 @@
Static staticOrSharedAttributes
Strip stripAttributes
+
+ Features bazel.StringListAttribute
}
type stripAttributes struct {
@@ -340,6 +342,8 @@
Shared: sharedAttrs,
Static: staticAttrs,
+
+ Features: linkerAttrs.features,
}
props := bazel.BazelTargetModuleProperties{
@@ -2407,6 +2411,8 @@
Cppflags: compilerAttrs.cppFlags,
Conlyflags: compilerAttrs.conlyFlags,
Asflags: asFlags,
+
+ Features: linkerAttrs.features,
}
} else {
attrs = &bazelCcLibrarySharedAttributes{
@@ -2435,6 +2441,8 @@
All: linkerAttrs.stripAll,
None: linkerAttrs.stripNone,
},
+
+ Features: linkerAttrs.features,
}
}
@@ -2464,6 +2472,8 @@
Cppflags bazel.StringListAttribute
Conlyflags bazel.StringListAttribute
Asflags bazel.StringListAttribute
+
+ Features bazel.StringListAttribute
}
func CcLibraryStaticBp2Build(ctx android.TopDownMutatorContext) {
@@ -2492,6 +2502,8 @@
Cppflags bazel.StringListAttribute
Conlyflags bazel.StringListAttribute
Asflags bazel.StringListAttribute
+
+ Features bazel.StringListAttribute
}
func CcLibrarySharedBp2Build(ctx android.TopDownMutatorContext) {