Write dexpreopt.config again during the build

Writing $OUT/dexpreopt.config during build setup and then using
it during the build causes bad incremental builds if a cleanspec
removes $OUT/dexpreopt.config.  Create a rule in Soong to write
out a copy so that it is a normal build artifact.

Bug: 132379813
Test: m checkbuild
Change-Id: I7755a7f8c1d6561fc83022a7f4cf7e4a64e989c9
This commit is contained in:
Colin Cross
2019-05-09 21:50:00 -07:00
parent a1591ab08c
commit 2d00f0dcae
4 changed files with 50 additions and 19 deletions

View File

@@ -78,7 +78,7 @@ func main() {
ctx := &pathContext{android.TestConfig(*outDir, nil)}
globalConfig, err := dexpreopt.LoadGlobalConfig(ctx, *globalConfigPath)
globalConfig, _, err := dexpreopt.LoadGlobalConfig(ctx, *globalConfigPath)
if err != nil {
fmt.Fprintf(os.Stderr, "error loading global config %q: %s\n", *globalConfigPath, err)
os.Exit(2)