Merge "Fix host path for dexpreopted system server modules defined in Make." am: e3b49c69da
Change-Id: Ib0942546db185baf35639f959b04ee8daf9a3f44
This commit is contained in:
committed by
Automerger Merge Worker
commit
592672a9bb
@@ -47,6 +47,8 @@ import (
|
||||
const SystemPartition = "/system/"
|
||||
const SystemOtherPartition = "/system_other/"
|
||||
|
||||
var DexpreoptRunningInSoong = false
|
||||
|
||||
// GenerateDexpreoptRule generates a set of commands that will preopt a module based on a GlobalConfig and a
|
||||
// ModuleConfig. The produced files and their install locations will be available through rule.Installs().
|
||||
func GenerateDexpreoptRule(ctx android.PathContext, globalSoong *GlobalSoongConfig,
|
||||
@@ -589,7 +591,14 @@ func NonUpdatableSystemServerJars(ctx android.PathContext, global *GlobalConfig)
|
||||
// at that time (Soong processes the jars in dependency order, which may be different from the
|
||||
// the system server classpath order).
|
||||
func SystemServerDexJarHostPath(ctx android.PathContext, jar string) android.OutputPath {
|
||||
return android.PathForOutput(ctx, "system_server_dexjars", jar+".jar")
|
||||
if DexpreoptRunningInSoong {
|
||||
// Soong module, just use the default output directory $OUT/soong.
|
||||
return android.PathForOutput(ctx, "system_server_dexjars", jar+".jar")
|
||||
} else {
|
||||
// Make module, default output directory is $OUT (passed via the "null config" created
|
||||
// by dexpreopt_gen). Append Soong subdirectory to match Soong module paths.
|
||||
return android.PathForOutput(ctx, "soong", "system_server_dexjars", jar+".jar")
|
||||
}
|
||||
}
|
||||
|
||||
func contains(l []string, s string) bool {
|
||||
|
@@ -62,6 +62,10 @@ type DexpreoptProperties struct {
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
dexpreopt.DexpreoptRunningInSoong = true
|
||||
}
|
||||
|
||||
func (d *dexpreopter) dexpreoptDisabled(ctx android.BaseModuleContext) bool {
|
||||
global := dexpreopt.GetGlobalConfig(ctx)
|
||||
|
||||
|
Reference in New Issue
Block a user