use build system flag RELEASE_READ_FROM_NEW_STORAGE to drive codegen
When RELEASE_READ_FROM_NEW_STORAGE is true, enable reading from new storage. So that we can ensure nextfood is not impacted. Ignore-AOSP-First: code only needed for git_main, and will be removed once test mission 1 is finished. Bug: b/332737012 Test: m Change-Id: Ide3f432321ebd3dce9427e7cb8f2086e24d3cc31
This commit is contained in:
@@ -63,11 +63,12 @@ var (
|
|||||||
` && ${aconfig} create-rust-lib` +
|
` && ${aconfig} create-rust-lib` +
|
||||||
` --mode ${mode}` +
|
` --mode ${mode}` +
|
||||||
` --cache ${in}` +
|
` --cache ${in}` +
|
||||||
|
` --allow-instrumentation ${debug}` +
|
||||||
` --out ${gendir}`,
|
` --out ${gendir}`,
|
||||||
CommandDeps: []string{
|
CommandDeps: []string{
|
||||||
"$aconfig",
|
"$aconfig",
|
||||||
},
|
},
|
||||||
}, "gendir", "mode")
|
}, "gendir", "mode", "debug")
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@@ -2,6 +2,7 @@ package codegen
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
"android/soong/rust"
|
"android/soong/rust"
|
||||||
@@ -82,6 +83,7 @@ func (a *aconfigDecorator) GenerateSource(ctx rust.ModuleContext, deps rust.Path
|
|||||||
Args: map[string]string{
|
Args: map[string]string{
|
||||||
"gendir": generatedDir.String(),
|
"gendir": generatedDir.String(),
|
||||||
"mode": mode,
|
"mode": mode,
|
||||||
|
"debug": strconv.FormatBool(ctx.Config().ReleaseReadFromNewStorage()),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
a.BaseSourceProvider.OutputFiles = android.Paths{generatedSource}
|
a.BaseSourceProvider.OutputFiles = android.Paths{generatedSource}
|
||||||
|
@@ -234,6 +234,11 @@ func (c Config) ReleaseHiddenApiExportableStubs() bool {
|
|||||||
Bool(c.config.productVariables.HiddenapiExportableStubs)
|
Bool(c.config.productVariables.HiddenapiExportableStubs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enable read flag from new storage
|
||||||
|
func (c Config) ReleaseReadFromNewStorage() bool {
|
||||||
|
return c.config.productVariables.GetBuildFlagBool("RELEASE_READ_FROM_NEW_STORAGE")
|
||||||
|
}
|
||||||
|
|
||||||
// A DeviceConfig object represents the configuration for a particular device
|
// A DeviceConfig object represents the configuration for a particular device
|
||||||
// being built. For now there will only be one of these, but in the future there
|
// being built. For now there will only be one of these, but in the future there
|
||||||
// may be multiple devices being built.
|
// may be multiple devices being built.
|
||||||
|
Reference in New Issue
Block a user