bp2build for tidy_timeout_srcs
Bug: 195029134 Test: m bp2build Change-Id: I59fdc16d8c224f42167e3b5a3857f4ff2f546825
This commit is contained in:
parent
c9b8fbdda0
commit
4c902d696a
2 changed files with 5 additions and 2 deletions
|
@ -3522,6 +3522,7 @@ cc_library_static {
|
||||||
tidy_checks: ["check1", "check2"],
|
tidy_checks: ["check1", "check2"],
|
||||||
tidy_checks_as_errors: ["check1error", "check2error"],
|
tidy_checks_as_errors: ["check1error", "check2error"],
|
||||||
tidy_disabled_srcs: ["bar.cpp"],
|
tidy_disabled_srcs: ["bar.cpp"],
|
||||||
|
tidy_timeout_srcs: ["baz.cpp"],
|
||||||
}`,
|
}`,
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
|
MakeBazelTarget("cc_library_static", "foo", AttrNameToString{
|
||||||
|
@ -3537,6 +3538,7 @@ cc_library_static {
|
||||||
"check2error",
|
"check2error",
|
||||||
]`,
|
]`,
|
||||||
"tidy_disabled_srcs": `["bar.cpp"]`,
|
"tidy_disabled_srcs": `["bar.cpp"]`,
|
||||||
|
"tidy_timeout_srcs": `["baz.cpp"]`,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -76,7 +76,7 @@ type tidyAttributes struct {
|
||||||
Tidy_checks []string
|
Tidy_checks []string
|
||||||
Tidy_checks_as_errors []string
|
Tidy_checks_as_errors []string
|
||||||
Tidy_disabled_srcs bazel.LabelListAttribute
|
Tidy_disabled_srcs bazel.LabelListAttribute
|
||||||
// TODO(b/255754964) support Tidy_timeout_srcs
|
Tidy_timeout_srcs bazel.LabelListAttribute
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Module) convertTidyAttributes(ctx android.BaseMutatorContext, moduleAttrs *tidyAttributes) {
|
func (m *Module) convertTidyAttributes(ctx android.BaseMutatorContext, moduleAttrs *tidyAttributes) {
|
||||||
|
@ -89,13 +89,14 @@ func (m *Module) convertTidyAttributes(ctx android.BaseMutatorContext, moduleAtt
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
archVariantProps := m.GetArchVariantProperties(ctx, &BaseCompilerProperties{})
|
archVariantProps := m.GetArchVariantProperties(ctx, &BaseCompilerProperties{})
|
||||||
for axis, configToProps := range archVariantProps {
|
for axis, configToProps := range archVariantProps {
|
||||||
for config, _props := range configToProps {
|
for config, _props := range configToProps {
|
||||||
if archProps, ok := _props.(*BaseCompilerProperties); ok {
|
if archProps, ok := _props.(*BaseCompilerProperties); ok {
|
||||||
archDisabledSrcs := android.BazelLabelForModuleSrc(ctx, archProps.Tidy_disabled_srcs)
|
archDisabledSrcs := android.BazelLabelForModuleSrc(ctx, archProps.Tidy_disabled_srcs)
|
||||||
moduleAttrs.Tidy_disabled_srcs.SetSelectValue(axis, config, archDisabledSrcs)
|
moduleAttrs.Tidy_disabled_srcs.SetSelectValue(axis, config, archDisabledSrcs)
|
||||||
|
archTimeoutSrcs := android.BazelLabelForModuleSrc(ctx, archProps.Tidy_timeout_srcs)
|
||||||
|
moduleAttrs.Tidy_timeout_srcs.SetSelectValue(axis, config, archTimeoutSrcs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue