m <module_name> builds <module_name>.<apex_name>

When a module is not available for platform (i.e.
//apex_available:platform is missing in the apex_available property), m
<module_name> previously just didn't work because there is no platform
variant of the module.

This change fixes the behavior; regardless of whether the platform
variant is available or not, m <module_name> builds all the apex
variants of the module along with the platform variant if it exists.

Bug: 147728094
Test: m conscrypt
Change-Id: Iedd3fa6fc0ed779c5f7c5d65f23d86f799ac0cbe
This commit is contained in:
Jiyong Park
2020-02-11 09:36:25 +09:00
parent 2b2aee33a7
commit 31af2678fe

View File

@@ -217,6 +217,12 @@ func (a *apexBundle) androidMkForFiles(w io.Writer, apexBundleName, apexName, mo
}
fmt.Fprintln(w, "include $(BUILD_PREBUILT)")
}
// m <module_name> will build <module_name>.<apex_name> as well.
if fi.moduleName != moduleName && a.primaryApexType {
fmt.Fprintln(w, ".PHONY: "+fi.moduleName)
fmt.Fprintln(w, fi.moduleName+": "+moduleName)
}
}
return moduleNames
}