Merge changes If6d512ff,I3171f921

* changes:
  Add convenience phony targets for system modules
  Don't panic in turbine with no classes
This commit is contained in:
Colin Cross 2017-10-25 17:28:25 +00:00 committed by Gerrit Code Review
commit 49a7feb189
3 changed files with 7 additions and 10 deletions

View file

@ -78,7 +78,7 @@ func main() {
// parse args // parse args
flag.Parse() flag.Parse()
args := flag.Args() args := flag.Args()
if len(args) < 2 { if len(args) < 1 {
flag.Usage() flag.Usage()
os.Exit(1) os.Exit(1)
} }

View file

@ -689,15 +689,11 @@ func (j *Module) compileJavaHeader(ctx android.ModuleContext, srcFiles android.P
var headerJar android.Path var headerJar android.Path
jars = append(jars, deps.staticHeaderJars...) jars = append(jars, deps.staticHeaderJars...)
if len(jars) == 0 { // we cannot skip the combine step for now if there is only one jar
panic("The turbine.jar is empty without any sources and static libs.") // since we have to strip META-INF/TRANSITIVE dir from turbine.jar
} else { combinedJar := android.PathForModuleOut(ctx, "turbine-combined", jarName)
// we cannot skip the combine step for now if there is only one jar TransformJarsToJar(ctx, combinedJar, "for turbine", jars, android.OptionalPath{}, false, []string{"META-INF"})
// since we have to strip META-INF/TRANSITIVE dir from turbine.jar headerJar = combinedJar
combinedJar := android.PathForModuleOut(ctx, "turbine-combined", jarName)
TransformJarsToJar(ctx, combinedJar, "for turbine", jars, android.OptionalPath{}, false, []string{"META-INF"})
headerJar = combinedJar
}
if j.properties.Jarjar_rules != nil { if j.properties.Jarjar_rules != nil {
jarjar_rules := android.PathForModuleSrc(ctx, *j.properties.Jarjar_rules) jarjar_rules := android.PathForModuleSrc(ctx, *j.properties.Jarjar_rules)

View file

@ -138,6 +138,7 @@ func (system *SystemModules) AndroidMk() android.AndroidMkData {
fmt.Fprintln(w) fmt.Fprintln(w)
fmt.Fprintln(w, makevar, ":=", system.outputFile.String()) fmt.Fprintln(w, makevar, ":=", system.outputFile.String())
fmt.Fprintln(w, ".KATI_READONLY", ":=", makevar) fmt.Fprintln(w, ".KATI_READONLY", ":=", makevar)
fmt.Fprintln(w, name+":", "$("+makevar+")")
} }
}, },
} }