Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6648045f authored by Jingwen Chen's avatar Jingwen Chen
Browse files

bp2build: genrule converter only supports "genrule".

This excludes the bp2build mutator from running for cc_genrule or
java_genrule, which may require alternative implementations.

Test: bp2build; bazel build //bionic/...
Change-Id: Ie14dd6dfa5e806fd6ac6e8f9989356f3880c79bf
parent b96a04ba
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -824,6 +824,11 @@ func GenruleBp2Build(ctx android.TopDownMutatorContext) {
		return
	}

	if ctx.ModuleType() != "genrule" {
		// Not a regular genrule. Could be a cc_genrule or java_genrule.
		return
	}

	// Bazel only has the "tools" attribute.
	tools := android.BazelLabelForModuleDeps(ctx, m.properties.Tools)
	tool_files := android.BazelLabelForModuleSrc(ctx, m.properties.Tool_files)