Merge changes from topics "bp2build-tidy-disabled-srcs", "bp2build-tidy-timeout-srcs"
* changes: bp2build for tidy_timeout_srcs bp2build for tidy_disabled_srcs
This commit is contained in:
@@ -646,7 +646,7 @@ func binaryBp2buildAttrs(ctx android.TopDownMutatorContext, m *Module) binaryAtt
|
||||
sdkAttributes: bp2BuildParseSdkAttributes(m),
|
||||
}
|
||||
|
||||
m.convertTidyAttributes(&attrs.tidyAttributes)
|
||||
m.convertTidyAttributes(ctx, &attrs.tidyAttributes)
|
||||
|
||||
return attrs
|
||||
}
|
||||
|
@@ -75,9 +75,11 @@ type tidyAttributes struct {
|
||||
Tidy_flags []string
|
||||
Tidy_checks []string
|
||||
Tidy_checks_as_errors []string
|
||||
Tidy_disabled_srcs bazel.LabelListAttribute
|
||||
Tidy_timeout_srcs bazel.LabelListAttribute
|
||||
}
|
||||
|
||||
func (m *Module) convertTidyAttributes(moduleAttrs *tidyAttributes) {
|
||||
func (m *Module) convertTidyAttributes(ctx android.BaseMutatorContext, moduleAttrs *tidyAttributes) {
|
||||
for _, f := range m.features {
|
||||
if tidy, ok := f.(*tidyFeature); ok {
|
||||
moduleAttrs.Tidy = tidy.Properties.Tidy
|
||||
@@ -85,6 +87,18 @@ func (m *Module) convertTidyAttributes(moduleAttrs *tidyAttributes) {
|
||||
moduleAttrs.Tidy_checks = tidy.Properties.Tidy_checks
|
||||
moduleAttrs.Tidy_checks_as_errors = tidy.Properties.Tidy_checks_as_errors
|
||||
}
|
||||
|
||||
}
|
||||
archVariantProps := m.GetArchVariantProperties(ctx, &BaseCompilerProperties{})
|
||||
for axis, configToProps := range archVariantProps {
|
||||
for config, _props := range configToProps {
|
||||
if archProps, ok := _props.(*BaseCompilerProperties); ok {
|
||||
archDisabledSrcs := android.BazelLabelForModuleSrc(ctx, archProps.Tidy_disabled_srcs)
|
||||
moduleAttrs.Tidy_disabled_srcs.SetSelectValue(axis, config, archDisabledSrcs)
|
||||
archTimeoutSrcs := android.BazelLabelForModuleSrc(ctx, archProps.Tidy_timeout_srcs)
|
||||
moduleAttrs.Tidy_timeout_srcs.SetSelectValue(axis, config, archTimeoutSrcs)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2792,7 +2792,7 @@ func sharedOrStaticLibraryBp2Build(ctx android.TopDownMutatorContext, module *Mo
|
||||
Runtime_deps: linkerAttrs.runtimeDeps,
|
||||
}
|
||||
|
||||
module.convertTidyAttributes(&commonAttrs.tidyAttributes)
|
||||
module.convertTidyAttributes(ctx, &commonAttrs.tidyAttributes)
|
||||
|
||||
var attrs interface{}
|
||||
if isStatic {
|
||||
|
@@ -678,7 +678,7 @@ func testBinaryBp2build(ctx android.TopDownMutatorContext, m *Module) {
|
||||
}
|
||||
}
|
||||
|
||||
m.convertTidyAttributes(&testBinaryAttrs.tidyAttributes)
|
||||
m.convertTidyAttributes(ctx, &testBinaryAttrs.tidyAttributes)
|
||||
|
||||
for _, propIntf := range m.GetProperties() {
|
||||
if testLinkerProps, ok := propIntf.(*TestLinkerProperties); ok {
|
||||
|
Reference in New Issue
Block a user