Merge "Sandbox soong_build by changing to root directory"

This commit is contained in:
Treehugger Robot
2020-01-11 06:00:21 +00:00
committed by Gerrit Code Review
23 changed files with 208 additions and 130 deletions

View File

@@ -36,10 +36,11 @@ type globalConfigAndRaw struct {
func dexpreoptGlobalConfigRaw(ctx android.PathContext) globalConfigAndRaw {
return ctx.Config().Once(dexpreoptGlobalConfigKey, func() interface{} {
if f := ctx.Config().DexpreoptGlobalConfig(); f != "" {
if data, err := ctx.Config().DexpreoptGlobalConfig(ctx); err != nil {
panic(err)
} else if data != nil {
soongConfig := dexpreopt.CreateGlobalSoongConfig(ctx)
ctx.AddNinjaFileDeps(f)
globalConfig, data, err := dexpreopt.LoadGlobalConfig(ctx, f, soongConfig)
globalConfig, err := dexpreopt.LoadGlobalConfig(ctx, data, soongConfig)
if err != nil {
panic(err)
}