Skip creating variants for disabled OSes
The documentation java_genrule_host states that it creates a single
variant, which would make it work with the single variant fallback
in AddDependency used by the data property, but it actually has a host
and a host-cross windows variant. Modify osMutator to take the
OS-specific enabled properties into account to skip creating variants
that will immediately be disabled so there is a single variant.
Test: m checkbuild
Change-Id: Ic2daab29f4fa3a3797d7a08348fbfcf1036ec5dc
diff --git a/android/path_properties.go b/android/path_properties.go
index 6b1cdb3..ee84c67 100644
--- a/android/path_properties.go
+++ b/android/path_properties.go
@@ -29,7 +29,7 @@
// property that is tagged with android:"path".
func pathDepsMutator(ctx BottomUpMutatorContext) {
m := ctx.Module().(Module)
- if m == nil {
+ if m == nil || !m.Enabled() {
return
}