Use prebuilt turbine jar for unbundled javac builds.
Test: m -j Change-Id: If2ab85f8591fe7ab275a1d4fefdd80d871f2c36d
This commit is contained in:
parent
49a7feb189
commit
9a36418089
|
@ -149,6 +149,15 @@ func (p AndroidPackageContext) HostJavaToolVariable(name, path string) blueprint
|
|||
})
|
||||
}
|
||||
|
||||
func (p AndroidPackageContext) HostJavaToolPath(config interface{}, path string) (Path, error) {
|
||||
ctx := &configErrorWrapper{p, config.(Config), []error{}}
|
||||
pa := PathForOutput(ctx, "host", ctx.config.PrebuiltOS(), "framework", path)
|
||||
if len(ctx.errors) > 0 {
|
||||
return nil, ctx.errors[0]
|
||||
}
|
||||
return pa, nil
|
||||
}
|
||||
|
||||
// IntermediatesPathVariable returns a Variable whose value is the intermediate
|
||||
// directory appended with the supplied path. It may only be called during a Go
|
||||
// package's initialization - either from the init() function or as part of a
|
||||
|
|
|
@ -93,10 +93,21 @@ func init() {
|
|||
return path.String(), nil
|
||||
}
|
||||
})
|
||||
pctx.VariableFunc("TurbineJar", func(config interface{}) (string, error) {
|
||||
turbine := "turbine.jar"
|
||||
if config.(android.Config).UnbundledBuild() {
|
||||
return "prebuilts/build-tools/common/framework/" + turbine, nil
|
||||
} else {
|
||||
path, err := pctx.HostJavaToolPath(config, turbine)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return path.String(), nil
|
||||
}
|
||||
})
|
||||
|
||||
pctx.HostJavaToolVariable("JarjarCmd", "jarjar.jar")
|
||||
pctx.HostJavaToolVariable("DesugarJar", "desugar.jar")
|
||||
pctx.HostJavaToolVariable("TurbineJar", "turbine.jar")
|
||||
|
||||
pctx.HostBinToolVariable("SoongJavacWrapper", "soong_javac_wrapper")
|
||||
|
||||
|
|
Loading…
Reference in New Issue