Reland: Move the Once cache for dexpreopt.GlobalConfig into the
dexpreopt package. Preparation for a future CL that will need to get the make-written GlobalConfig from within dexpreopt. Also rename the Load*Config functions to Parse*Config, since they don't actually load the config files anymore. This relands https://r.android.com/1211982. Bug: 145934348 Test: m Change-Id: Icb9332a93811d77d2d8b06e983b92501b180a358
This commit is contained in:
@@ -84,9 +84,9 @@ func main() {
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
globalSoongConfig, err := dexpreopt.LoadGlobalSoongConfig(ctx, globalSoongConfigData)
|
||||
globalSoongConfig, err := dexpreopt.ParseGlobalSoongConfig(ctx, globalSoongConfigData)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error loading global Soong config %q: %s\n", *globalSoongConfigPath, err)
|
||||
fmt.Fprintf(os.Stderr, "error parsing global Soong config %q: %s\n", *globalSoongConfigPath, err)
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
@@ -96,9 +96,9 @@ func main() {
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
globalConfig, err := dexpreopt.LoadGlobalConfig(ctx, globalConfigData)
|
||||
globalConfig, err := dexpreopt.ParseGlobalConfig(ctx, globalConfigData)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error loading global config %q: %s\n", *globalConfigPath, err)
|
||||
fmt.Fprintf(os.Stderr, "error parsing global config %q: %s\n", *globalConfigPath, err)
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
@@ -108,9 +108,9 @@ func main() {
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
moduleConfig, err := dexpreopt.LoadModuleConfig(ctx, moduleConfigData)
|
||||
moduleConfig, err := dexpreopt.ParseModuleConfig(ctx, moduleConfigData)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "error loading module config %q: %s\n", *moduleConfigPath, err)
|
||||
fmt.Fprintf(os.Stderr, "error parsing module config %q: %s\n", *moduleConfigPath, err)
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user