Update wording on depfile property error
Bug: 307824623 Test: Presubmits Change-Id: I25919150d2ee2483099e7cb710330dc259d57e66
This commit is contained in:
@@ -581,17 +581,15 @@ func (g *Module) generateCommonBuildActions(ctx android.ModuleContext) {
|
|||||||
|
|
||||||
func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||||
// Allowlist genrule to use depfile until we have a solution to remove it.
|
// Allowlist genrule to use depfile until we have a solution to remove it.
|
||||||
// TODO(b/235582219): Remove allowlist for genrule
|
// TODO(b/307824623): Remove depfile property
|
||||||
if Bool(g.properties.Depfile) {
|
if Bool(g.properties.Depfile) {
|
||||||
sandboxingAllowlistSets := getSandboxingAllowlistSets(ctx)
|
sandboxingAllowlistSets := getSandboxingAllowlistSets(ctx)
|
||||||
// TODO(b/283852474): Checking the GenruleSandboxing flag is temporary in
|
|
||||||
// order to pass the presubmit before internal master is updated.
|
|
||||||
if ctx.DeviceConfig().GenruleSandboxing() && !sandboxingAllowlistSets.depfileAllowSet[g.Name()] {
|
if ctx.DeviceConfig().GenruleSandboxing() && !sandboxingAllowlistSets.depfileAllowSet[g.Name()] {
|
||||||
ctx.PropertyErrorf(
|
ctx.PropertyErrorf(
|
||||||
"depfile",
|
"depfile",
|
||||||
"Deprecated to ensure the module type is convertible to Bazel. "+
|
"Deprecated because with genrule sandboxing, dependencies must be known before the action is run "+
|
||||||
"Try specifying the dependencies explicitly so that there is no need to use depfile. "+
|
"in order to add them to the sandbox. "+
|
||||||
"If not possible, the escape hatch is to add the module to allowlists.go to bypass the error.")
|
"Please specify the dependencies explicitly so that there is no need to use depfile.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -708,7 +708,7 @@ func TestGenruleAllowlistingDepfile(t *testing.T) {
|
|||||||
depfile: true,
|
depfile: true,
|
||||||
cmd: "cat $(in) > $(out) && cat $(depfile)",
|
cmd: "cat $(in) > $(out) && cat $(depfile)",
|
||||||
`,
|
`,
|
||||||
err: "depfile: Deprecated to ensure the module type is convertible to Bazel",
|
err: "depfile: Deprecated because with genrule sandboxing, dependencies must be known before the action is run in order to add them to the sandbox",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: `no error when module is allowlisted`,
|
name: `no error when module is allowlisted`,
|
||||||
|
Reference in New Issue
Block a user