Loading cc/binary.go +4 −0 Original line number Diff line number Diff line Loading @@ -646,6 +646,8 @@ func binaryBp2buildAttrs(ctx android.TopDownMutatorContext, m *Module) binaryAtt sdkAttributes: bp2BuildParseSdkAttributes(m), } m.convertTidyAttributes(&attrs.tidyAttributes) return attrs } Loading Loading @@ -698,4 +700,6 @@ type binaryAttributes struct { Features bazel.StringListAttribute sdkAttributes tidyAttributes } cc/bp2build.go +20 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,26 @@ type staticOrSharedAttributes struct { Native_coverage bazel.BoolAttribute sdkAttributes tidyAttributes } type tidyAttributes struct { Tidy *bool Tidy_flags []string Tidy_checks []string Tidy_checks_as_errors []string } func (m *Module) convertTidyAttributes(moduleAttrs *tidyAttributes) { for _, f := range m.features { if tidy, ok := f.(*tidyFeature); ok { moduleAttrs.Tidy = tidy.Properties.Tidy moduleAttrs.Tidy_flags = tidy.Properties.Tidy_flags moduleAttrs.Tidy_checks = tidy.Properties.Tidy_checks moduleAttrs.Tidy_checks_as_errors = tidy.Properties.Tidy_checks_as_errors } } } // groupSrcsByExtension partitions `srcs` into groups based on file extension. Loading cc/library.go +2 −0 Original line number Diff line number Diff line Loading @@ -2791,6 +2791,8 @@ func sharedOrStaticLibraryBp2Build(ctx android.TopDownMutatorContext, module *Mo Runtime_deps: linkerAttrs.runtimeDeps, } module.convertTidyAttributes(&commonAttrs.tidyAttributes) var attrs interface{} if isStatic { commonAttrs.Deps.Add(baseAttributes.protoDependency) Loading cc/test.go +4 −0 Original line number Diff line number Diff line Loading @@ -643,6 +643,8 @@ type testBinaryAttributes struct { Gtest bool Isolated bool tidyAttributes } // testBinaryBp2build is the bp2build converter for cc_test modules. A cc_test's Loading Loading @@ -676,6 +678,8 @@ func testBinaryBp2build(ctx android.TopDownMutatorContext, m *Module) { } } m.convertTidyAttributes(&testBinaryAttrs.tidyAttributes) for _, propIntf := range m.GetProperties() { if testLinkerProps, ok := propIntf.(*TestLinkerProperties); ok { testBinaryAttrs.Gtest = proptools.BoolDefault(testLinkerProps.Gtest, true) Loading Loading
cc/binary.go +4 −0 Original line number Diff line number Diff line Loading @@ -646,6 +646,8 @@ func binaryBp2buildAttrs(ctx android.TopDownMutatorContext, m *Module) binaryAtt sdkAttributes: bp2BuildParseSdkAttributes(m), } m.convertTidyAttributes(&attrs.tidyAttributes) return attrs } Loading Loading @@ -698,4 +700,6 @@ type binaryAttributes struct { Features bazel.StringListAttribute sdkAttributes tidyAttributes }
cc/bp2build.go +20 −0 Original line number Diff line number Diff line Loading @@ -66,6 +66,26 @@ type staticOrSharedAttributes struct { Native_coverage bazel.BoolAttribute sdkAttributes tidyAttributes } type tidyAttributes struct { Tidy *bool Tidy_flags []string Tidy_checks []string Tidy_checks_as_errors []string } func (m *Module) convertTidyAttributes(moduleAttrs *tidyAttributes) { for _, f := range m.features { if tidy, ok := f.(*tidyFeature); ok { moduleAttrs.Tidy = tidy.Properties.Tidy moduleAttrs.Tidy_flags = tidy.Properties.Tidy_flags moduleAttrs.Tidy_checks = tidy.Properties.Tidy_checks moduleAttrs.Tidy_checks_as_errors = tidy.Properties.Tidy_checks_as_errors } } } // groupSrcsByExtension partitions `srcs` into groups based on file extension. Loading
cc/library.go +2 −0 Original line number Diff line number Diff line Loading @@ -2791,6 +2791,8 @@ func sharedOrStaticLibraryBp2Build(ctx android.TopDownMutatorContext, module *Mo Runtime_deps: linkerAttrs.runtimeDeps, } module.convertTidyAttributes(&commonAttrs.tidyAttributes) var attrs interface{} if isStatic { commonAttrs.Deps.Add(baseAttributes.protoDependency) Loading
cc/test.go +4 −0 Original line number Diff line number Diff line Loading @@ -643,6 +643,8 @@ type testBinaryAttributes struct { Gtest bool Isolated bool tidyAttributes } // testBinaryBp2build is the bp2build converter for cc_test modules. A cc_test's Loading Loading @@ -676,6 +678,8 @@ func testBinaryBp2build(ctx android.TopDownMutatorContext, m *Module) { } } m.convertTidyAttributes(&testBinaryAttrs.tidyAttributes) for _, propIntf := range m.GetProperties() { if testLinkerProps, ok := propIntf.(*TestLinkerProperties); ok { testBinaryAttrs.Gtest = proptools.BoolDefault(testLinkerProps.Gtest, true) Loading